-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit of Access for Owner, Contributor, and Reader. #141
base: main
Are you sure you want to change the base?
Conversation
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things we still need to plan:
- Improving the look of the header of the edit modal
- Displaying status messages after adding or deleting a role assignment
- Using strings.js for labels on EditDetails
- Feature flag
- Group membership providing "Owner" role
} | ||
|
||
if (req == null) | ||
log.LogError("err"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't seem like a useful error message?
src/api/Endpoints/FileSystems.cs
Outdated
return new OkObjectResult(storageRbacEntry); | ||
} | ||
|
||
private static bool CanModifyRbac(RoleOperations roleOps, string accountResourceId, string container, string principalId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest abstracting this in a service class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not work if my Storage Blob Data Owner role is thanks to group membership.
var roleAssignments = GetRoleAssignments(containerResourceId); | ||
var authRoleAssignment = roleAssignments.FirstOrDefault(ra => ra.Id.EndsWith(rbacId)); | ||
if (authRoleAssignment == null) | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we throw an exception here?
var roleAssignments = GetRoleAssignments(scope, principalId); | ||
|
||
// Filter down to the specific role definition | ||
var authRoleAssignment = roleAssignments?.FirstOrDefault(ra => ra.PrincipalId == principalId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does GetRoleAssignments
not already filter by principal ID? If not, why is it passed?
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net |
No description provided.