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

SAK-49150 Gradebook TA not in group, but with permission to grade a group, cannot actually grade #12589

Merged
merged 1 commit into from
May 20, 2024

Conversation

kunaljaykam
Copy link
Member

@kunaljaykam kunaljaykam commented May 11, 2024

@kunaljaykam kunaljaykam changed the title SAK-49150 Gradebook: TA not in group, but with permission to grade a … SAK-49150 Gradebook: TA not in group, but with permission to grade a group, cannot actually grade May 11, 2024
@ern ern changed the title SAK-49150 Gradebook: TA not in group, but with permission to grade a group, cannot actually grade SAK-49150 Gradebook TA not in group, but with permission to grade a group, cannot actually grade May 14, 2024

List<String> groupReferences = perms.stream().map(PermissionDefinition::getGroupReference).collect(Collectors.toList());

final Collection<Group> groups = !groupReferences.isEmpty() ? site.getGroups() : site.getGroupsWithMember(userDirectoryService.getCurrentUser().getId());
Copy link
Contributor

Choose a reason for hiding this comment

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

If groupReferences is not empty you are returning all the groups for the site. What if the user only has permission on a subset of the site's groups?

@kunaljaykam kunaljaykam marked this pull request as ready for review May 15, 2024 07:08
@kunaljaykam kunaljaykam marked this pull request as draft May 15, 2024 07:08
Copy link
Contributor

@adrianfish adrianfish left a comment

Choose a reason for hiding this comment

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

this looks good to me now. Thanks Kunal.

@kunaljaykam kunaljaykam marked this pull request as ready for review May 20, 2024 07:56
@adrianfish adrianfish merged commit 30c295a into sakaiproject:master May 20, 2024
5 checks passed
ern added a commit that referenced this pull request Jun 3, 2024
…rade a group, cannot actually grade (#12589)"

This reverts commit 30c295a.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants