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

[rbac] Role list view #1860

Merged
merged 46 commits into from
Apr 26, 2022
Merged

Conversation

ShaiahWren
Copy link
Contributor

@ShaiahWren ShaiahWren commented Apr 6, 2022

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 and role-form aim to make containers role-create and role-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.

Screen Shot 2022-04-19 at 4 55 12 PM
Screen Shot 2022-04-19 at 4 55 23 PM
Screen Shot 2022-04-19 at 4 55 53 PM

@ZitaNemeckova
Copy link
Member

ZitaNemeckova commented Apr 7, 2022

Few things that would be nice to fix in followup PR but not something to block merging :)

  • Edit button is blue

Screenshot 2022-04-07 at 10 20 16

  • Delete button should be disabled when a role is blocked

  • Edit button should be disabled when a role is blocked. It's possible to edit but not save (no Save or Cancel button)

Screenshot 2022-04-07 at 10 24 35

  • When filtering by Status the value of the filter preserves and is "kinda assigned" to Role name. See Collections -> Approval for correct behaviour

Screenshot 2022-04-07 at 10 37 23

@ZitaNemeckova
Copy link
Member

ZitaNemeckova commented Apr 7, 2022

Things that are blocking merging:

  • Editing has no Save or Cancel button for locked/unloocked roles.

Screenshot 2022-04-07 at 10 27 30

  • Editing doesn't read permissions correctly:

    • create a role with permissions
    • edit the role
    • no permissions are selected
  • PR checks / pr-checks (pull_request) complains about unused stuff

  • Limit name and description to 128 -> when I try to save a long name/description it returns 500 with value too long for type character varying(128) info

  • Description has to be required -> I get 400 when i try to save it without description


const id = this.props.match.params['role'];

const params = ParamHelper.parseParamString(props.location.search, [
Copy link
Member

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',
Copy link
Member

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) => {
Copy link
Member

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.

Copy link
Contributor Author

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) => {
Copy link
Member

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.

Copy link
Contributor Author

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) {
Copy link
Member

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?

Copy link
Contributor Author

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;
Copy link
Member

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 ?

Copy link
Contributor Author

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 ? (
Copy link
Member

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) {
Copy link
Member

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.

Copy link
Contributor Author

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'
Copy link
Member

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) {
Copy link
Member

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() {
Copy link
Member

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() {
Copy link
Member

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() {
Copy link
Member

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 && (
Copy link
Member

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!')}
Copy link
Member

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}
Copy link
Member

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.

@ZitaNemeckova ZitaNemeckova mentioned this pull request Apr 7, 2022
});
}

private actionSavePermissions() {
Copy link
Member

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() {
Copy link
Member

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>
Copy link
Member

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);
Copy link
Member

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) });
Copy link
Member

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.

Copy link
Contributor Author

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';
Copy link
Member

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.

Copy link
Contributor Author

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();
Copy link
Member

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 ? (
Copy link
Member

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.

@ShaiahWren
Copy link
Contributor Author

Merging and closing the pr. :)

@ShaiahWren ShaiahWren merged commit 85a1208 into ansible:feature/rbac-roles Apr 26, 2022
@ShaiahWren ShaiahWren deleted the role-list-view branch April 26, 2022 15:21
himdel pushed a commit that referenced this pull request Apr 26, 2022
* 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
himdel pushed a commit that referenced this pull request Apr 29, 2022
* 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
@himdel himdel mentioned this pull request May 3, 2022
himdel pushed a commit that referenced this pull request May 8, 2022
* 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
himdel pushed a commit that referenced this pull request Jun 7, 2022
* 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
himdel pushed a commit that referenced this pull request Jun 23, 2022
* 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
jerabekjiri pushed a commit to jerabekjiri/ansible-hub-ui that referenced this pull request Jul 12, 2022
* 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
jerabekjiri added a commit that referenced this pull request Jul 14, 2022
* 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>
himdel pushed a commit that referenced this pull request Aug 1, 2022
* 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
@himdel himdel changed the title Role list view [rbac] Role list view Aug 1, 2022
himdel pushed a commit that referenced this pull request Aug 15, 2022
* 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
@himdel himdel mentioned this pull request Aug 15, 2022
himdel added a commit that referenced this pull request Aug 15, 2022
* 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>
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.

None yet

4 participants