-
Notifications
You must be signed in to change notification settings - Fork 75
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
[rbac] Role list view #1860
[rbac] Role list view #1860
Conversation
b34bb8b
to
c6ab9e0
Compare
Few things that would be nice to fix in followup PR but not something to block merging :)
|
Things that are blocking merging:
|
|
||
const id = this.props.match.params['role']; | ||
|
||
const params = ParamHelper.parseParamString(props.location.search, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be extra and nto needed.
page_size: params['page_size'] || 10, | ||
sort: params['sort'] || 'username', | ||
tab: params['tab'] || 'permissions', | ||
isEditing: params['isEditing'] === 'true', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that only one that you get and need is id
. There's no pagination or sorting. And isEditing
will always be false
because it's not part of params
.
permissions: result.data.data.map((x) => x.permission), | ||
}); | ||
}) | ||
.catch((e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This gives me 404
but doesn't show an alert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still relevant? Let me know. :)
name: result.data.name, | ||
}); | ||
}) | ||
.catch((e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it with non-existent id and it's not showing 404 page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be working now. :)
} | ||
|
||
componentDidMount() { | ||
if (!this.context.user || !this.context.user.model_permissions.view_group) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this.context.user.is_anonymous
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does const notAuthorised = !this.context.user || this.context.user.is_anonymous;
work?
} | ||
|
||
const notAuthorised = | ||
!this.context.user || !this.context.user.model_permissions.add_user; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this.context.user.is_anonymous
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I did const notAuthorised = !this.context.user || this.context.user.is_anonymous;
Does that work?
]; | ||
const title = t`Create new role`; | ||
|
||
return notAuthorised ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to do
<React.Fragment>
<BaseHeader
breadcrumbs={<Breadcrumbs links={breadcrumbs}></Breadcrumbs>}
title={title}
></BaseHeader>
{
notAuthorised ? ( <EmptyStateUnauthorized />) : (<Main>....</Main>)
}
<EmptyStateUnauthorized />
</React.Fragment>
if in the future there's a change in <BaseHeader>
there's only one place to change it :)
></AlertList> | ||
); | ||
} | ||
if (unauthorised) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to after <BaseHeader>
. See user-list
for reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is implemented correctly now - might want to check and make sure. :)
}} | ||
type='text' | ||
validated={this.toError(!this.state.roleError)} | ||
placeholder='Add a role description here' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be translated.
const { user } = this.context; | ||
const { editPermissions } = this.state; | ||
|
||
if (!user || !user.model_permissions.delete_group) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about user.is_anonymous
?
Edit: Nevermind
); | ||
} | ||
|
||
private renderControls() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is never used.
return validated ? 'default' : 'error'; | ||
} | ||
|
||
private get updateParams() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never used.
); | ||
} | ||
|
||
private renderPermissions() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never used.
</Flex> | ||
))} | ||
</div> | ||
{editPermissions && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be added to the render
so the form has butttons.
<Button | ||
variant='primary' | ||
isDisabled={savingPermissions} | ||
onClick={() => console.log('Saving!')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should call a saving function.
</Button> | ||
<Button | ||
variant='secondary' | ||
isDisabled={savingPermissions} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cancel button should be always enabled.
}); | ||
} | ||
|
||
private actionSavePermissions() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never called.
); | ||
} | ||
|
||
private actionCancelPermissions() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicking a Cancel button should redirect back to Role list page. It should work the same way as in Users.
<section className='body'> | ||
<div> | ||
<div style={{ paddingBottom: '8px', paddingTop: '16px' }}> | ||
<Title headingLevel='h2'>Details</Title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be translated.
.then(() => this.setState({ redirect: Paths.roleList })) | ||
.catch((err) => { | ||
this.setState({ roleError: mapErrorMessages(err) }); | ||
console.log('roleError: ', this.state.roleError); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove a console.log.
RoleAPI.create({ name, description, permissions }) | ||
.then(() => this.setState({ redirect: Paths.roleList })) | ||
.catch((err) => { | ||
this.setState({ roleError: mapErrorMessages(err) }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not working correctly. I tried to create a role with existing name and I seen in console, that it failed but not in UI. It seems that mapErrorMessages
is not parsing it correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed:) Thanks for your help:)
} | ||
|
||
if (!params['sort']) { | ||
params['sort'] = '-pulp_created'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no pulp_created
column. name
would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the pulp_created column and then kept the sorting as -pulp-created
, just so you can see when a new role is added it shows up nicely at the top of the page. Otherwise a role by the name 'zita' gets sent to the bottom and it seems like it wasn't created :)
} | ||
} | ||
|
||
export const RoleAPI = new API(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to add export
it to src/api/index.ts
. It's kinda working but gives some ugly errors.
}} | ||
/> | ||
</div> | ||
{loading ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be here for the second time.
Issue: AAH-1131
Issue: AAH-1131
Issue: AAH-1131
Issue: AAH-1131
Issue: AAH-1131
Issue: AAH-1131
Issue: AAH-1131
efee7ab
to
9f72e9b
Compare
Issue: AAH-1131
56029ea
to
167167e
Compare
Merging and closing the pr. :) |
* create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131
* create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131
* create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131
* create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131
* create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131
* create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131
* Role list view (#1860) * create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131 * Rework groups view (#1797) * Rework groups view * Fix params issues * fix requests spam * fix group_management test * add allSettled promise * comment out and skip permissions related tests * add api changes and fixes * fix translation * update changes * fix pagination and UI * show only selected roles * add custom permissions and hide No permission * drop i18n-js from lockfile Issue: AAH-1130 * add cy.createRole command No-Issue * wip add commands * add test preview roles Issue: AAH-1616 * rewrite group_management test Issue: AAH-1616 * add test for deleted assigned roles Issue: AAH-1616 * fix pagination Issue: AAH-1616 * code cleanup Issue: AAH-1616 * add EmptyState data-cy Issue: AAH-1616 * rework rbac tests Issue: AAH-1678 * minor test fixes Issue: AAH-1678 * use galaxykit commands instead Issue: AAH-1678 * fix rebase errors Issue: AAH-1678 * fix test err and lint prop Issue: AAH-1678 Co-authored-by: Shaiah Emigh-Doyle <64337863+ShaiahWren@users.noreply.github.com>
* create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131
* create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131
* Role list view (#1860) * create role list view * roleAPI * updates exports for roleAPI * update roleList paths * add table * add item to table headers and implement rolelisttable in role-list component. * add permission chip selector * update RoleAPI and role-list-view * fix EmptyStateFilter * delete function role delete * update roleAPI * initialize createRole UI page * role create functions * formatting * changelog entry * rework editRole path * add description to create role component * get description field working in create role ui * update name and description state in role edit component * implement saveRole function in role-edit component * error handing on edit role page * adding error handling to create and edit pages * add DateComponent to list view * remove extra loading spinner * Add tooltip to locked roles * add sorting to created at column * drop unused createRole method * use helper text * remove extraneous code in maperrormessages.tsx * cleanup UX on edit role page * fix UX on role create form * get redirect and tooltips working * add filtering for galaxy. roles only * work with mapErrorMessages error * additional form input validation * finalize form validation * cleanup compound filters * reusable role-form * role-edit parent component * properly type nameValidated and descriptionValidated * tighten up the mapErrors method for network error handling. * remove extra import and use just one <Form> component in RoleForm * include galaxy__starts_with in UI * rework validateInput functions * move validateINput and mapNetworkErros to util * move role functions to containers/role-management Issue: AAH-1131 * Rework groups view (#1797) * Rework groups view * Fix params issues * fix requests spam * fix group_management test * add allSettled promise * comment out and skip permissions related tests * add api changes and fixes * fix translation * update changes * fix pagination and UI * show only selected roles * add custom permissions and hide No permission Issue: AAH-1130 * Fix CI, unify breadcrumb types (#1978) * BreadcrumbType: unify types for breadcrumbs, fix eslint warning (any) * namespaces.js test: disable tests failing on roles * Rbac testing (#1993) * cypress test rbac UI pages * edit role test * GroupRoleAPI, RoleAPI, PulpAPI - move logic to components (#1981) * GroupRoleAPI, PulpAPI - move getRolesWithPermissions outside api, keep only listRoles; use apiPath instead of custom constructor * RoleAPI.list - drop hardcoded filter, move to components using it * RoleList already sets the default param, but needs to be able to override it away, the rest just moves the hardcoding to the user component * GroupRoleAPI - listRoles use super.list for ordering * GroupRoleAPI: addRoleToGroup comment about content_object being required * TaskManagementAPI: use super.list since the ordering logic was moved to PulpAPI * Drop all ObjectPermissionField logic (#1980) * drop ObjectPermissionField from EE edit, NS create, NS edit * namespace-edit test - drop edit owners field test * test add roles to group (#1995) * add roles to group * update intercept command to replace cy.wait(10000) * add login to beforeEach hook. * Optimize assigned roles to group loading and fix bugs (#2086) * fix not showing new roles * rework and optimize group role fetching * fix .bugfix file * fix group_roles test Issue: AAH-1600 Issue: AAH-1602 * Fix redirection to not existing group (#2118) * add notFound redirection * remove group name from message title Issue: AAH-1668 * New UI for object permission assignment (#1863) * Create new UI for object permission assignment * add GroupType * namespace edit, detail, EE base tab cleanups * namespace create - redirect to Namespace owners on success * namespace edit, EE edit - info alert pointing to Owners tab * GroupDetailRoleManagement - use EmptyStateNoData instead of Custom for the no data screen * move PreviewRoles, SelectRoles, GroupRolePermissions to components, use EmptyStateNoData * EE base: move addAlert, alerts to base * SelectGroup * OwnersTab: add to namespace detail & EE detail tabs Issue: AAH-1129 * add permission checks (#2210) Issue: AAH-1699 * OwnersTab SelectRoles - filter roles by ?for_object_type (#2186) * Move user, group, role and permission related components to src/components/rbac/ (#2247) * fix roles screens for user with group perms (#2266) AAH-1698 * Role lists - default sort by name, show description, pretty "Galaxy only" in AppliedFilters (#2092) * RoleList - pretty AppliedFilters for `name__startswith: "galaxy."` -> `Galaxy only: true` * RoleList - default sort by name * GroupDetailRoleManagement: add description field, switch to RolePermissions now that we have data for .description and .permission in the list api * SelectRoles: sort by role name it's the default sort now, but adding it makes the sort indicator work affects group add roles, namespace/EE roles in wizad * OwnersTab: sort groups and roles by name * PulpAPI - add useOrdering bool param, but default to false and enable it for RoleAPI and TaskManagementAPI, but not GroupRoleAPI related to pulp/pulpcore#2703 * rbac_create test: filter for role before checking it's present now that we're sorting by name, it's not on the first page anymore .. which is an opportunity to test filtering works too :) * role_list whitespace fix * Remove Role -> Remove role * OwnersTab: use lodash sortBy instead of a handmade <=> * GroupRoleAPI - useOrdering after pulp/pulpcore#2849 * role list - rename Locked to Built-in/Editable * role-list: don't show "can't edit/remove" tooltip for editable items * rbac_edit: don't expect newest roles on the top, filter to find the right one * user_detail: there is no ui/group-list request, only a route change * fixup rbac_edit * user_detail: use galaxykit more * galaxykit error log * rbac_edit: specify which edit to click * galaxykit log code and error on failure; user_detail fix param order * Test Namespace/EE owners (#2230) * rbac_owners test: test Namespace owners and EE owners tab * EE: show Detail tab even if container name contains "detail", "images", "activity" or "owners" (currently naming a container rbac_owners_123 causes the Detail tab to become inaccessible, and the UI assumes the Owners tab is open when it isn't, breaking tests) * rbac_owners: create test group, don't rely on system:partners-engineers * group_roles - clean up role afterwards; rbac_owners - use the first role if multiple * rbac_owners fixups - modal strong->b, delete-button, not delete_button * rbac_owners: close alerts after checking them * fixup remove group check * Fix additional perms (#2267) * hide sync button in ee detail * hide delete button in ee image * add perms in owners tab * add perms to owners tab * cypress: install galaxykit branch with roles (#2268) * RBAC Test rework (#2184) * add cy.createRole command * wip add commands * add test preview roles * rewrite group_management test * add test for deleted assigned roles * fix pagination * code cleanup * add EmptyState data-cy * rework rbac tests * minor test fixes * use galaxykit commands instead * fix rebase errors * fix test err and lint prop Issue: AAH-1616 Issue: AAH-1678 Co-authored-by: Shaiah Emigh-Doyle <64337863+ShaiahWren@users.noreply.github.com> * Group roles test (#2117) * rebase and fix conflicts * fix group_roles test * fix group_management test * fix CI * fix double data-cy attr Issue: AAH-1616 * Add and fix permissions related to roles and group/roles (#2337) * let group/role assigning with change_group perm * fix additional roles and group/roles perms * fix missing space * unauth group detail screen * add unauth to group detail screen * fix perms to be able to edit ee Issue: AAH-1729 Issue: AAH-1752 Issue: AAH-1754 Issue: AAH-1766 Issue: AAH-1810 * Remove unexpected digest value (#2375) Issue: AAH-1841 * EE edit - only make the Owners tab link clickable when editing (#2376) Issue: AAH-1792 * group-list: filter "Group name" by name__icontains, not exact name (#2336) * group-list: filter "Group name" by name__icontains, not exact name * group-list: use name__contains, icontains not supported by api * fix missing i18n Issue: AAH-1806 * rbac_edit: fix selector, it's not `li[role=menuitem]` but `li > a[role=menuitem]` .. omitting the element names Co-authored-by: Shaiah Emigh-Doyle <64337863+ShaiahWren@users.noreply.github.com> Co-authored-by: Jiří Jeřábek <Jerabekjirka@email.cz> Co-authored-by: Brian McLaughlin <bmclaugh@redhat.com>
Issue: https://issues.redhat.com/browse/AAH-1131
Functionality: viewing and editing existing roles in the system, and creating new ones.
Child components
role-header
androle-form
aim to make containersrole-create
androle-edit
more DRY. :)FILTERING from list is still a bug, visually, that is echoed across the application. A new issue should be created to unify how the compound filter looks after params are selected.
Input welcome regarding architecture.