Skip to content
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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

softcraftsman
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Oct 2, 2022

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 2, 2022

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 2, 2022

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 2, 2022

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net

Copy link
Contributor

@SvenAelterman SvenAelterman left a 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");
Copy link
Contributor

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 Show resolved Hide resolved
return new OkObjectResult(storageRbacEntry);
}

private static bool CanModifyRbac(RoleOperations roleOps, string accountResourceId, string container, string principalId)
Copy link
Contributor

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?

Copy link
Contributor

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.

src/api/Endpoints/FileSystems.cs Outdated Show resolved Hide resolved
src/api/Endpoints/FileSystems.cs Outdated Show resolved Hide resolved
var roleAssignments = GetRoleAssignments(containerResourceId);
var authRoleAssignment = roleAssignments.FirstOrDefault(ra => ra.Id.EndsWith(rbacId));
if (authRoleAssignment == null)
return null;
Copy link
Contributor

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?

src/api/Services/RoleOperations.cs Show resolved Hide resolved
src/api/Endpoints/FileSystems.cs Outdated Show resolved Hide resolved
var roleAssignments = GetRoleAssignments(scope, principalId);

// Filter down to the specific role definition
var authRoleAssignment = roleAssignments?.FirstOrDefault(ra => ra.PrincipalId == principalId
Copy link
Contributor

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?

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Nov 7, 2022

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://proud-ground-08f27020f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-pebble-03f47660f-141.eastus2.1.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants