* AccessControl: FGAC permissions for orgs endpoint on frontend
Protect org update endpoints
add or refactor missing right messages
cover org page
* removing scopes from orgs
* Perform permission control with global org
* Perform the error handling in case of 403
* Simplify frontend code by requiring read access for sure
* Remove roles I added to decrease the number of changes
* Remove the check for server admin to reduce the number of changes
* change error message
* Cleaning todos
* Remove unecessary changes
* Fix tests
* Update test snapshot
* Update pkg/api/roles.go
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
* Update public/app/features/admin/AdminEditOrgPage.tsx
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
* Format AdminEditOrgPage for linting
* Update public/app/features/admin/AdminEditOrgPage.tsx
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
* Update public/app/features/admin/AdminEditOrgPage.tsx
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Update public/app/features/admin/AdminListOrgsPage.tsx
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* Commit suggestions
* Commit suggestion canRead canWrite
* fix typo
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
* refactor(plugins): add empty line between methods
* feat(api): add an API function for updating plugin settings
* feat(plugins): add a "getting started" guide for enabling / disabling app plugins
* test(plugins/admin): add tests for enable/disable functionality
* refactor(plugins/admin): update the name of the test cases
Now that we have multiple type of post-installation steps it probably makes sense.
* Dashboard: Update check for current panel
* Get datasource name as before
* Update public/app/plugins/datasource/dashboard/DashboardQueryEditor.tsx
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
* import SHARED_DASHBOARD_QUERY
* Add some unit tests
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
* Working version of migrate secrets CLI command
* Move user oauth info encryption away from db transaction
* Enable a mechanism for re-use db session on encryption
* De-duplicate shared code between db and runner commands
* Set up Wire build graph
* Remove enterprise Wire set
* Fix cylic dependency: sqlstore.DBSession <-> xorm.Session
* Minor fix (add missing base64 encoding)
* Extract CLI 'secrets-migration' commands from 'data-migration' ones
* Move runner package outside commands
* Update Makefile (gen-go path)
* Minor prettier fix
* Some minor XORM related refactors
* Include new Wire enterprise file into .gitignore
* Update Wire deps
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
Co-authored-by: Tania B <yalyna.ts@gmail.com>
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
* Set up Wire build graph
* Remove enterprise Wire set
* Move runner package outside commands
* Update Makefile (gen-go path)
* Minor prettier fix
* Include new Wire enterprise file into .gitignore
* Update Wire deps
* Update the grabpl version
Co-authored-by: Dan Cech <dcech@grafana.com>
* use fixed_interval in date_histogram
* Add 8.0 to available versions in datasource settings
* Remove moving_avg from available metric aggregations
* Add ES8 devenv
* Update public/app/plugins/datasource/elasticsearch/components/QueryEditor/MetricAggregationsEditor/utils.ts
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* Add FE tests
* Add BE test
* fix FE test
* fix BE test
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
* 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>