lahirujayathilake commented on code in PR #520:
URL: https://github.com/apache/airavata-custos/pull/520#discussion_r3568096243


##########
web/src/app/(portal)/admin/users/management/identities.ts:
##########
@@ -0,0 +1,27 @@
+import { BookUser, Fingerprint, Globe, KeyRound, type LucideIcon } from 
"lucide-react";

Review Comment:
   Include the Apache 2 license headers



##########
web/src/shared/layout/nav.ts:
##########
@@ -57,6 +58,12 @@ export const portalNav: NavItem[] = [
     group: "allocations",
     ability: { action: "read", subject: "Project" },
   },
+  {
+    href: "/admin/users",
+    label: "Users & Permissions",
+    icon: UserCog,
+    group: "admin",
+  },

Review Comment:
    Add the ability guard like the other entries, should be `ability: { action: 
"read", subject: "User" }



##########
web/src/shared/layout/UserPill.tsx:
##########
@@ -74,6 +77,10 @@ export function UserPill() {
               </Link>
             )}
           />
+          <DropdownMenuItem onClick={() => setPermissionsOpen(true)}>
+            <ShieldCheck className="mr-2 h-4 w-4" />
+            My Permissions
+          </DropdownMenuItem>

Review Comment:
   we don't need to include the permissions here, because this is already in 
the settings. Remove the mock data as well; `session.privileges` carries the 
real user privileges, no need to mock



##########
web/src/app/(portal)/layout.tsx:
##########


Review Comment:
   Scope this to admin/users/layout.tsx so the mock state stays inside the 
admin pages instead of the whole portal.



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