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

Add owner role support #300

Merged
merged 3 commits into from
Dec 1, 2023
Merged

Add owner role support #300

merged 3 commits into from
Dec 1, 2023

Conversation

mlsmaycon
Copy link
Contributor

@mlsmaycon mlsmaycon commented Nov 29, 2023

Update checks for admin to include owner role

Updated role list to include role for users

Updated activity with new event type handler

Links to: netbirdio/netbird#1340

Update checks for admin to include owner role

Updated role list to include role for users

Updated activity with new event type handler
Comment on lines +365 to +378
case "transferred.owner.role":
if (event.meta.email || event.meta.username || event.target_id) {
return renderMultiRowSpan(
event.meta.username ? event.meta.username : event.target_id,
event.meta.email ? event.meta.email : "User"
);
}
if (event.meta.user_name) {
return renderMultiRowSpan(
event.meta.user_name,
event.meta.is_service_user ? "Service User" : "User"
);
}
return "-";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we duplicating this code?

Copy link
Contributor

Choose a reason for hiding this comment

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

Now when I checked closer I saw for PATs we also duplicate the same code

@mlsmaycon mlsmaycon merged commit a208940 into main Dec 1, 2023
2 checks passed
@mlsmaycon mlsmaycon deleted the add-owner-role-support branch December 1, 2023 15:57
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