* Role picker: Load users roles in batch
* Use orgId in request
* Add roles to OrgUser type
* Improve loading logic
* Improve loading indicator
* Fix org page
* Update service accounts page
* Use bulk roles query for teams
* Use POST requests for search
* Use post request for teams
* Update betterer results
* Review suggestions
* AdminEditOrgPage: move API calls to separate file
* add a new feature toggle for locking down role sync for users managed by GCom
* protect the frontend and the backend using the new feature toggle
* fix merge
* show invite button if disable login form is set to false
* fix test
* Update public/app/features/users/UsersActionBar.tsx
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* FIX: Hide Invite Button with external user management
* Hide also when login form is disabled
* add tests and readability
---------
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* fix: disable orgrolepicker if externaluser is synced
* add disable to role picker
* just took me 2 hours to center the icon
* wip
* fix: check externallySyncedUser for API call
* remove check from store
* add: tests
* refactor authproxy and made tests run
* add: feature toggle
* set feature toggle for tests
* add: IsProviderEnabled
* refactor: featuretoggle name
* IsProviderEnabled tests
* add specific tests for isProviderEnabled
* fix: org_user tests
* add: owner to featuretoggle
* add missing authlabels
* remove fmt
* feature toggle
* change config
* add test for a different authmodule
* test refactor
* gen feature toggle again
* fix basic auth user able to change the org role
* test for basic auth role
* make err.base to error
* lowered lvl of log and input mesg
* Add auth labels and access control metadata to org users search results
* Fix search result JSON model
* Org users: Use API for pagination
* Fix default page size
* Refactor: UsersListPage to functional component
* Refactor: update UsersTable component code style
* Add pagination to the /orgs/{org_id}/users endpoint
* Use pagination on the AdminEditOrgPage
* Add /orgs/{org_id}/users/search endpoint to prevent breaking API
* Use existing search store method
* Remove unnecessary error
* Remove unused
* Add query param to search endpoint
* Fix endpoint docs
* Minor refactor
* Fix number of pages calculation
* Use SearchOrgUsers for all org users methods
* Refactor: GetOrgUsers as a service method
* Minor refactor: rename orgId => orgID
* Fix integration tests
* Fix tests
* Add disabled column to Org's Users table
* fix typo
* Change column order
* Add test for testing whether GetOrgUsers populates the DTO correctly
* Remove type assertion
* RolePicker: Check if user has permissions to delegate roles
* UserRolePicker: Require both UserRolsAdd and UserRolesRemove for chaning
roles
* RolePicker: Add option for controlling if roles can be updated to
RolePicker
* UserOrgs: Dont try to fetch roles with wrong permission
* RolePicker: make usage consistent with allowed actions
* RolePickerMenu: Remove unused property
* UserOrgs: Check for correct permission
* UserRolePicker: add apply to controll apply behaviour instand of
updateDisabled
* UserOrgs: Check for correct permission when trying to update roles
* RolePicker: Disable button if no roles or org role can be updated
* RolePicker: Always close on update
* RolePicker: Fix issue with updating immutable value
* ServiceAccountsListItem: Pass correct value to RolePicker
* ServiceAccountCreatePage: Pass correct value
* First stab at new page layouts behind feature toggle
* Simplifying PageHeader
* Progress on a new model that can more easily support new and old page layouts
* Progress
* rename folder
* Progress
* Minor change
* fixes
* Fixing tests
* Make breadcrumbs work
* Add tests for old Page component
* Adding tests for new Page component and behavior
* fixing page header test
* Fixed test
* AppChrome outside route
* Renaming folder
* Minor fix
* Updated
* Fixing StoragePage
* Fix for banners
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* update action names
* correctly retrieve teams for signed in user
* remove test
* undo swagger changes
* undo swagger changes pt2
* add migration from old action names to the new ones
* rename from list to read
* linting
* also update alertign actions
* fix migration
* Refactor: move fetching from role picker to parent component
* Make built in role props optional
* Initial team role picker
* Add role picker to the teams list
* Optimize fetching roles
* Add pagination for the teams page
* Fix tests
* Hide roles if access control not enabled
* Fix test snapshots
* Refactor: use useAsync() hook
* Refactor: simplify input component
* Move api calls to separate file
* Refactor: use useAsync() hook for user role picker
* Tweak role picker input width
* Fix pagination
* Update test snapshots
* Use loading state from useAsync() hook
* Fix roles label if no roles assigned
* AccessControl: Disable user remove and update roles when they do not have the appropriate permissions
* AccessControl: Ensure frontend tests pass in CI
* Very simple role picker
* Style radio button
* Separate component for the built-in roles selector
* Custom component instead of Select
* refactor
* Custom input for role picker
* Refactor
* Able to select built-in role
* Add checkboxes for role selector
* Filter out fixed and internal roles
* Add action buttons
* Implement role search
* Fix selecting roles
* Pass custom roles to update
* User role picker
* Some UX work on role picker
* Clear search query on close
* Blur input when closed
* Add roles counter
* Refactor
* Add disabled state for picker
* Adjust disabled styles
* Replace ChangeOrgButton with role picker on admin/users page
* Remove unused code
* Apply suggestions from code review
Suggestions from the @Clarity-89
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Refactor: fix some errors after applying review suggestions
* Show fixed roles in the picker
* Show applied fixed roles
* Fix role counter
* Fix checkbox selection
* Use specific Role type for menu options
* Fix menu when roles list is empty
* Fix radio button name
* Make fixed roles from built-in role disabled
* Make whole menu scrollable
* Add BuiltInRole type
* Simplify appliedRoles
* Simplify options and props
* Do not select and disable inherited fixed roles
* Enable selecting fixed role
* Add description tooltip
* Fix role param name
* Export common input styles from grafana/ui
* Add ValueContainer
* Use value container
* Refactor appliedRoles logic
* Optimise role rendering
* Display selected roles
* Fix tooltip position
* Use OrgRole type
* Optimise role rendering
* Use radio button from grafana UI
* Submenu WIP
* Role picker submenu WIP
* Hide role description
* Tweak styles
* Implement submenu selection
* Disable role selection if it's inherited
* Show new role picker only in Enterprise
* Fix types
* Use orgid when fetching/updating roles
* Use orgId in all access control requests
* Styles for partially checked checkbox
* Tweak group option styles
* Role picker menu: refactor
* Reorganize roles in menu
* Fix input behaviour
* Hide groups on search
* Remove unused components
* Refactor
* Fix group selection
* Remove icons from role tags
* Add spacing for menu sections
* Rename clear all to clear in submenu
* Tweak menu width
* Show changes in the input when selecting roles
* Exclude inherited roles from selection
* Increase menu height
* Change built-in role in input on select
* Include inherited roles to the built-in role selection
* refcator import
* Refactor role picker to be able to pass roles and builtin roles getters
* Add role picker to the org users page
* Show inherited builtin roles in the popup
* Filter out managed roles
* Fix displaying initial builtin roles
* Show tooltip only for non-builtin roles
* Set min width for focused input
* Do not disable inherited roles (by design)
* Only show picker if access control enabled
* Fix tests
* Only close menu on click outside or on indicator click
* Open submenu on hover
* Don't search on empty query
* Do not open/close menu on click
* Refactor
* Apply suggestions from code review
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Fix formatting
* Apply suggestions
* Add more space for close menu sign
* Tune tooltip styles
* Move tooltip to the right side of option
* Use info sign instead of question
Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Expose FilterInput from grafana/ui
* Make table filter case insensitive
* Update packages/grafana-ui/src/components/Table/FilterList.tsx
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
* build(webpack): bump to v5 and successful yarn start compilation
* build(webpack): update postcss dependencies
* build(webpack): silence warnings about hash renamed to fullhash
* build(webpack): enable persistent cache to store generated webpack modules / chunks
* build(webpack): prefer eslintWebpackPlugin over tschecker so eslint doesn't block typechecking
* chore(yarn): run yarn-deduplicate to clean up dependencies
* chore(yarn): refresh lock file after clean install
* build(webpack): prefer output.clean over CleanWebpackPlugin
* build(webpack): prefer esbuild over babel-loader for dev config
* build(babel): turn off cache compression to improve build performance
* build(webpack): get production builds working
* build(webpack): remove phantomJS (removed from grafana in v7) specific loader
* build(webpack): put back babel for dev builds no performance gain in using esbuild in webpack
* build(webpack): prefer terser and optimise css plugins for prod. slower but smaller bundles
* build(webpack): clean up redundant code. inform postcss about node_modules
* build(webpack): remove deprecation warnings flag
* build(webpack): bump packages, dev performance optimisations, attempt to get hot working
* chore(storybook): use webpack 5 for dev and production builds
* build(storybook): speed up dev build
* chore(yarn): refresh lock file
* chore(webpack): bump webpack and related deps to latest
* refactor(webpack): put back inline-source-map, move start scripts out of grafana toolkit
* feat(webpack): prefer react-refresh over react-hot-loader
* build(webpack): update webpack.hot to use react-refresh
* chore: remove react-hot-loader from codebase
* refactor(queryeditorrow): fix circular dependency causing react-fast-refresh errors
* revert(webpack): remove stats.errorDetails from common config
* build(webpack): bump to v5 and successful yarn start compilation
* build(webpack): update postcss dependencies
* build(webpack): silence warnings about hash renamed to fullhash
* build(webpack): enable persistent cache to store generated webpack modules / chunks
* build(webpack): prefer eslintWebpackPlugin over tschecker so eslint doesn't block typechecking
* chore(yarn): run yarn-deduplicate to clean up dependencies
* chore(yarn): refresh lock file after clean install
* build(webpack): prefer output.clean over CleanWebpackPlugin
* build(webpack): prefer esbuild over babel-loader for dev config
* build(babel): turn off cache compression to improve build performance
* build(webpack): get production builds working
* build(webpack): remove phantomJS (removed from grafana in v7) specific loader
* build(webpack): put back babel for dev builds no performance gain in using esbuild in webpack
* build(webpack): prefer terser and optimise css plugins for prod. slower but smaller bundles
* build(webpack): clean up redundant code. inform postcss about node_modules
* build(webpack): remove deprecation warnings flag
* build(webpack): bump packages, dev performance optimisations, attempt to get hot working
* chore(storybook): use webpack 5 for dev and production builds
* build(storybook): speed up dev build
* chore(yarn): refresh lock file
* chore(webpack): bump webpack and related deps to latest
* refactor(webpack): put back inline-source-map, move start scripts out of grafana toolkit
* feat(webpack): prefer react-refresh over react-hot-loader
* build(webpack): update webpack.hot to use react-refresh
* chore: remove react-hot-loader from codebase
* refactor(queryeditorrow): fix circular dependency causing react-fast-refresh errors
* revert(webpack): remove stats.errorDetails from common config
* revert(webpack): remove include from babel-loader so symlinks (enterprise) work as before
* refactor(webpack): fix deprecation warnings in prod builds
* fix(storybook): fix failing builds due to replacing css-optimise webpack plugin
* fix(storybook): use raw-loader for svg icons
* build(webpack): fix dev script colors error
* chore(webpack): bump css-loader and react-refresh-webpack-plugin to latest versions
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>