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

fixed admin room access issues #5543

Merged

Conversation

SilentFlameCR
Copy link
Contributor

fixes #5445

@farhatahmad
Copy link
Collaborator

Can you confirm if this issue is only with the Shared Access tab? Can an admin do other operations on the room as expected even if the room is shared with them?

@SilentFlameCR
Copy link
Contributor Author

Can you confirm if this issue is only with the Shared Access tab? Can an admin do other operations on the room as expected even if the room is shared with them?

Yes, admins can perform other operations as expected when a room is shared with them.

@@ -37,6 +38,9 @@ export default function SharedAccess() {
const { data: sharedUsers } = useSharedUsers(friendlyId, searchInput);
const deleteSharedAccess = useDeleteSharedAccess(friendlyId);
const { data: room } = useRoom(friendlyId);
const currentUser = useAuth();
const isAdmin = currentUser?.role.name === 'Administrator';
const isOwner = room?.owner_name === currentUser?.name;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Going based off of the room owner's name isn't a good idea here. What if someone else has teh same name?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You should use the room.shared instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point! I updated the code to use the room.shared boolean instead of owner name

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@farhatahmad farhatahmad merged commit 2d369da into bigbluebutton:master Nov 21, 2023
SebastianAppDev pushed a commit to SebastianAppDev/greenlight that referenced this pull request Dec 20, 2023
* fixed admin room access issues

* fixed eslint errors

* updated to use room shared boolean over owner name
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.

Administrators can't manage room access if they are on the list
2 participants