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

Feat/entity permisions graphql #187

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

assadriaz
Copy link
Contributor

Extended graphql api to show entity permission.

Copy link

sonarcloud bot commented Oct 18, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
64.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@@ -35,6 +35,18 @@ public interface AuthorizationService {
*/
void verifyCanDeleteEntities(Collection<? extends EntityStructure> entities);

/**
* Verify that the current user has right to delete the given entity.
* @throws AccessDeniedException if not.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boolean and throwing AccessDeniedException. Will this method ever return false?

@@ -67,5 +77,46 @@ public <T extends EntityStructure> Set<String> getRelevantRolesForEntity(T entit
return dataScopedAuthorizationService.getRelevantRolesForEntity(entity);
}

@Override
public boolean canDeleteEntity(EntityStructure entity) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this account for zone restrictions?


@Override
public boolean canEditEntity(EntityStructure entity) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this account for zone restriction?

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.

2 participants