qf-jonathan commented on code in PR #37235:
URL: https://github.com/apache/superset/pull/37235#discussion_r2710034901


##########
superset-frontend/src/features/roles/RoleListEditModal.tsx:
##########
@@ -104,21 +104,15 @@ function RoleListEditModal({
   permissions,
   groups,
 }: RoleListEditModalProps) {
-  const { id, name, permission_ids, user_ids, group_ids } = role;
+  const { id, name, permission_ids, group_ids } = role;
   const [activeTabKey, setActiveTabKey] = useState(roleTabs.edit.key);
   const { addDangerToast, addSuccessToast } = useToasts();
   const [roleUsers, setRoleUsers] = useState<UserObject[]>([]);
   const [loadingRoleUsers, setLoadingRoleUsers] = useState(true);
   const formRef = useRef<FormInstance | null>(null);
 
   useEffect(() => {
-    if (!user_ids.length) {
-      setRoleUsers([]);
-      setLoadingRoleUsers(false);
-      return;
-    }

Review Comment:
   @msyavuz We could keep it, but I removed it because we're removing 
`user_ids`, as that parameter is no longer needed. I also think it's preferable 
to get fresh user data from the backend, in case a user has been recently 
created or assigned the current role. What you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to