jayvenn21 commented on code in PR #524:
URL: https://github.com/apache/airavata-custos/pull/524#discussion_r3591411020


##########
web/src/app/(portal)/admin/users/roles/RoleFormDialog.tsx:
##########
@@ -140,57 +125,17 @@ export function RoleFormDialog({
 
           <PermissionMatrixEditor
             permissions={permissions}
+            catalog={catalog}
             onTogglePermission={(key) => setPermissions((prev) => 
togglePermission(prev, key))}
           />
-
-          <div className="border-t border-border" />
-
-          <div className="space-y-2">
-            <Label htmlFor="role-user-search">Assign to users 
(optional)</Label>
-            <Input
-              id="role-user-search"
-              type="search"
-              value={userSearch}
-              onChange={(e) => setUserSearch(e.target.value)}
-              placeholder="Search by username or email"
-            />
-            <ul className="max-h-40 space-y-1 overflow-y-auto rounded-md 
border p-2">
-              {matchingUsers.length === 0 ? (
-                <li className="px-1 py-1 text-sm text-muted-foreground">No 
users match.</li>
-              ) : (
-                matchingUsers.map((u) => {
-                  const id = u.id ?? u.email ?? "";
-                  return (
-                    <li key={id}>
-                      <label className="flex cursor-pointer items-center gap-2 
rounded-sm px-1 py-1 text-sm hover:bg-muted">
-                        <input
-                          type="checkbox"
-                          checked={selectedUserIds.has(id)}
-                          onChange={() => toggleUserSelected(id)}
-                          className="size-4 rounded border-input"
-                        />
-                        <span className="font-medium 
text-foreground">{fullNameFor(u)}</span>
-                        <span className="text-xs 
text-muted-foreground">{u.email}</span>
-                      </label>
-                    </li>
-                  );
-                })
-              )}
-            </ul>

Review Comment:
   yes, dropping that was intentional for this PR. i kept the role dialog 
focused on role create/update + privilege change as assigning users to roles 
goes through /users/{id}/roles and feels more tied to the user-management flow. 
i'm happy to add it back here too if you want the role dialog to support 
assignment as part of this pull request



-- 
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]

Reply via email to