Skip to content

Add 'Show Group'#66

Open
PabloValarezo wants to merge 1 commit intogabrielsroka:masterfrom
PabloValarezo:patch-2
Open

Add 'Show Group'#66
PabloValarezo wants to merge 1 commit intogabrielsroka:masterfrom
PabloValarezo:patch-2

Conversation

@PabloValarezo
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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