Skip to content

Commit f670c02

Browse files
committed
refactor(rbac): update role permissions for guest and standard users
- Remove `Permissions.userUpdateOwned` from _appStandardUserPermissions - Add `Permissions.userUpdateOwned` to _appGuestUserPermissions - Include comments explaining the need for `Permissions.userUpdateOwned`
1 parent a575011 commit f670c02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/rbac/role_permissions.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ final Set<String> _appGuestUserPermissions = {
1414
Permissions.userContentPreferencesReadOwned,
1515
Permissions.userContentPreferencesUpdateOwned,
1616
Permissions.remoteConfigRead,
17+
// Allows a user to update their own User object. This is essential for
18+
// features like updating the `feedActionStatus` (e.g., when a user
19+
// dismisses an in-feed prompt, etc). The endpoint handler ensures only
20+
// non-sensitive fields can be modified.
21+
Permissions.userUpdateOwned,
1722
};
1823

1924
final Set<String> _appStandardUserPermissions = {
2025
..._appGuestUserPermissions,
2126
Permissions.userReadOwned,
22-
Permissions.userUpdateOwned,
2327
Permissions.userDeleteOwned,
2428
};
2529

0 commit comments

Comments
 (0)