Bug #2761
Need to work on Root Admin Permission for separate all permission check and made proper.
Description
Need to work on Root Admin Permission for separate all permission check and made proper -
Updated by Shreya Agarwal about 2 months ago
worked in platform permissions migration with the addition of granular master data permissions (masterdata.access-type.view/manage, masterdata.network-type.view/manage, masterdata.charger-error-code.view/manage, masterdata.car-brands.view/manage, masterdata.car-models.view/manage, masterdata.connector-type.view/manage) and third-party API settings permissions (settings.third-party-api.view/manage), along with dashboard view permission (dashboard.view) all at Platform level. The backend changes include updated SystemPermissions.cs constants, PlatformPermissions definitions, and migration script V0045 with direct permission assignments for rootadmin user. Frontend work is partially complete with PermissionBasedSidebar.tsx updated, but pending updates for AccessTypeManagement, NetworkTypeManagement, also focus on learning React hooks (useState, useEffect) and try to understanding the project's frontend structure .
Updated by Shreya Agarwal about 1 month ago
implemented granular permission-based access control
Fixed all identified permission-related UI issues
Comprehensive testing completed with Platform User account
1. Permission Integration in Frontend
Added granular permissions across all modules in the application
Implemented permission checks in Sidebar components for menu visibility
Added permission-based rendering in multiple pages like: Car Brand Management , Charger Error Code Management , Third Party API Settings , access type , car model , network type , connector type etc ( sidebar, permission sidebar )
2. Permission Testing
Created a Platform User account for testing purposes
Conducted thorough testing of all permissions one by one
Tested both VIEW and MANAGE permissions for each module
Identified issues where Edit buttons were visible with only VIEW permissions
3.Fixed Edit button visibility issue in Car Brand Management
Corrected permission logic in Third Party API Settings
Verified Charger Error Code Management permission checks
Ensured proper separation between VIEW and MANAGE permissions
4. Sidebar Permission Updates
Updated sidebar menu items to respect user permissions
Ensured proper visibility of menu items based on user role and permissions
Verified sub-menu items also respect granular permissions
Updated by Shreya Agarwal about 1 month ago
Today I fixed the edit button visibility issue in Third Party API Settings page. The problem was that the edit button was visible to users with only VIEW permission because the canManageApiKeys variable was incorrectly using canViewThirdPartyApi instead of canManageThirdPartyApi. Fixed this by separating view and manage permissions - now canManageApiKeys correctly uses canManageThirdPartyApi permission check. fixed the Settings menu visibility to hide completely when no third-party permission is given, ensuring the menu only appears when user has at least one specific settings permission
Verified that users with only VIEW permission can no longer see the edit button, while users with MANAGE permission can still access all edit functionalities.
Today, I also reviewed the permission document and started verifying the API permissions against the documented access requirements. I compared the permissions with the corresponding UI and API behavior to ensure they are implemented correctly. A significant portion of the permission checks has been completed, while some permissions are still pending verification and will be continued i. I will complete the remaining permission validation and document any discrepancies found.