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 'Show Group' #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PabloValarezo
Copy link
Contributor

Similar to 'Show User' this change will show the same popup but for a specific group.

Similar to 'Show User' this change will show the same popup but for a specific group.
var group;
getJSON(`/api/v1/groups/${groupId}`).then(aGroup => {
group = aGroup;
$(".subheader").html(`${e(group.profile.name)}`);
Copy link
Owner

Choose a reason for hiding this comment

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

there is no element with this css class. it exists for Users, but not for Groups

document.title += ` - ${e(group.profile.name)} ${e(group.profile.description)}`;
});
function showGroup() {
function toString(o, i = '') {
Copy link
Owner

Choose a reason for hiding this comment

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

this code for toString was copied and pasted from showUser. it should be factored out.

also, indentation should be cleaned up

const groupPopup = createPopup("Group");
// It'd make sense to add group logos in here, however, if it's not `OKTA_GROUP`, it's `APP_GROUP` -so, no distinction between AD, Slack, etc.
// const logo = group.type == "OKTA_GROUP" ? "okta" : group.type.toLowerCase();
groupPopup.html(`</span><br><pre>${e(toString(group))}</pre>`);
Copy link
Owner

@gabrielsroka gabrielsroka Feb 18, 2024

Choose a reason for hiding this comment

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

has an extra </span><br>

groupPopup.html(`</span><br><pre>${e(toString(group))}</pre>`);
}
createDiv("Show Group", mainPopup, showGroup);
createPrefixA("<li class=option>", "<span class='icon person-16-gray'></span>Show Group", ".okta-dropdown-list", showGroup);
Copy link
Owner

Choose a reason for hiding this comment

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

this adds an item to the More Actions menu which exists for Users, but not for Groups

@gabrielsroka
Copy link
Owner

gabrielsroka commented Feb 18, 2024

thanks for your PR. see comments above.

please make sure you understand and test every line before submitting a PR.

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