404 Commits

Author SHA1 Message Date
2d03815770 Users: Disable users removed from LDAP (#16820)
* Users: add is_disabled column

* Users: disable users removed from LDAP

* Auth: return ErrInvalidCredentials for failed LDAP auth

* User: return isDisabled flag in user search api

* User: mark disabled users at the server admin page

* Chore: refactor according to review

* Auth: prevent disabled user from login

* Auth: re-enable user when it found in ldap

* User: add api endpoint for disabling user

* User: use separate endpoints to disable/enable user

* User: disallow disabling external users

* User: able do disable users from admin UI

* Chore: refactor based on review

* Chore: use more clear error check when disabling user

* Fix login tests

* Tests for disabling user during the LDAP login

* Tests for disable user API

* Tests for login with disabled user

* Remove disable user UI stub

* Sync with latest LDAP refactoring
2019-05-21 14:52:49 +03:00
846b9327a5 LDAP: Added reload endpoint for LDAP config (#15470)
* 4843 - Added reload endpoint for LDAP config

closes #4843

* Refactor to make the reload work after master drifted
2019-05-03 14:53:07 +02:00
013f1b8d19 App Plugins: support react pages and tabs (#16586) 2019-05-02 10:15:39 -07:00
eb82a75668 Provisioning: Show file path of provisioning file in save/delete dialogs (#16706)
* Add file path to metadata and show it in dialogs

* Make path relative to config directory

* Fix tests

* Add test for the relative path

* Refactor to use path relative to provisioner path

* Change return types

* Rename attribute

* Small fixes from review
2019-04-30 13:32:18 +02:00
42b745a098 Provisioning: Add API endpoint to reload provisioning configs (#16579)
* Add api to reaload provisioning

* Refactor and simplify the polling code

* Add test for the provisioning service

* Fix provider initialization and move some code to file reader

* Simplify the code and move initialization

* Remove unused code

* Update comment

* Add comment

* Change error messages

* Add DashboardProvisionerFactory type

* Update imports

* Use new assert lib

* Use mutext for synchronizing the reloading

* Fix typo

Co-Authored-By: aocenas <mr.ocenas@gmail.com>

* Add docs about the new api
2019-04-25 09:06:44 +02:00
8b0dd4244b Search: Fixes search limits and adds a page parameter (#16458)
* Search: Fixes search limits and adds a page parameter

This adds a page parameter to search api without adding
any major breaking change.

It does at an api validation error when trying to use
a limit beyond 5000. This is a breaking change. We could
remove this and have it only in the docs and describe that this
is a limit that grafana will apply silently.

Fixes #16049

* Fix: Corrected wrong array slice change

* Docs: minor docs fix

* Search: fixed folder tests

* Fixed: Moved limit to correct inner query

* Search: moving limit check and page check

* Search: limit in handler is no longer needed
2019-04-17 13:07:50 +02:00
2d7fc55df7 Provisioning: Do not allow deletion of provisioned dashboards (#16211)
* Unprovision dashboard in case of DisableDeletion = true

* Rename command struct

* Handle removed provision files

* Allow html in confirm-modal

* Do not show confirm button without onConfirm

* Show dialog on deleting provisioned dashboard

* Changed DeleteDashboard to DeleteProvisionedDashboard

* Remove unreachable return

* Add provisioned checks to API

* Remove filter func

* Fix and add tests for deleting dashboards

* Change delete confirm text

* Added and used pkg/errors for error wrapping
2019-04-10 13:29:10 +02:00
2ae63e70c0 Alerting: Notification channel http api enhancements (#16219)
Now returns uid in response to get notification channel by id.
Adds GET/PUT/DELETE support for notification channel by uid, 
  /api/alert-notifications/uid/:uid.
Break apart alerting and alert notification http api docs in two 
  pages and update documentation to make it up to date
  with current implementation.

Fixes #16012
2019-03-26 18:37:02 +07:00
adf0390b2c teams: local access to bus, moving away from dep on global. 2019-03-19 14:01:20 +01:00
6589a4e55f teams: better names for api permissions. 2019-03-19 14:01:20 +01:00
b60e71c28b teams: moved logic for searchteams to backend 2019-03-19 14:01:15 +01:00
782b5b6a3a teams: viewers and editors can view teams 2019-03-19 14:01:14 +01:00
21d3d27452 teams: editors can't remove the last admin from a team. 2019-03-19 14:01:13 +01:00
a90b3e331e config: updated feature toggle name 2019-03-19 13:59:39 +01:00
23231e6d51 teams: added delete team guard 2019-03-19 13:57:29 +01:00
8e7a8282c1 teams: removed feature toggle as it is already in middleware 2019-03-19 13:57:28 +01:00
2a88052c14 teams: can update team members permission. 2019-03-19 13:57:23 +01:00
af4994ba16 teams: editor added as admin for created teams. 2019-03-19 13:57:22 +01:00
22e098b830 teams: editors can work with teams. 2019-03-19 13:57:22 +01:00
c8c004095c permissions: broken out func for making creator admin. 2019-03-19 13:57:21 +01:00
0cd5a6772d feat(api): support list/revoke auth token in admin/current user api 2019-03-08 15:15:38 +01:00
a81d5486b0 Viewers with viewers_can_edit should be able to access /explore (#15787)
* fix: Viewers with viewers_can_edit should be able to access /explore #15773

* refactoring initial PR a bit to simplify function and reduce duplication
2019-03-05 12:41:01 +01:00
5638c67be8 org admins should only be able to access org admin pages 2019-03-04 15:51:18 +01:00
a29b99b96b only editor/admin should have access to alert list/notifications pages 2019-03-04 15:48:07 +01:00
e163aadfe4 use authtoken for session quota restrictions
closes #15360
2019-02-12 15:10:55 +01:00
a7a964ec19 Added PATCH verb end point for annotation op
Added new PATCH verb annotation endpoint

Removed unwanted fmt

Added test cases for PATCH verb annotation endpoint

Fixed formatting issue

Check arr len before proceeding

Updated doc to include PATCH verb annotation endpt
2019-02-05 09:43:17 +10:00
cfd8eb5167 now /api/login/ping returns Response 2019-02-04 17:37:07 +01:00
8764fb5aa6 inject login/logout hooks 2019-01-15 15:16:20 +01:00
fb5c59c611 Add GET /api/users/:id/teams for orgAdmin 2018-11-19 17:08:10 +08:00
f560c3297e Merge pull request #14034 from grafana/12550_team_preferences
Team preferences support
2018-11-15 07:35:10 -08:00
480da34279 filter out alpha plugins in api call, fixes #14030 2018-11-15 11:10:47 +01:00
5f9fecd254 feat: team preferences 2018-11-12 20:01:53 +01:00
dddbe62d6c Merge branch 'master' into react-panels-step1 2018-10-19 09:15:37 +02:00
ee0cc9bd77 Merge branch 'master' into data-source-instance-to-react 2018-10-16 12:14:11 +02:00
8ba865bf57 Merge branch 'master' into react-panels-step1 2018-10-12 13:31:20 +02:00
8c9939df72 Adds backend hooks service so extensions can modify index data 2018-10-12 11:26:42 +02:00
abef94b0da made it possible to have frontend code in symlinked folders that can add routes 2018-10-11 12:36:04 +02:00
565edc1ed3 added setting top hide plugins in alpha state 2018-10-09 17:47:43 +02:00
b3c78f1265 wip: data source permissions hooks 2018-10-01 15:38:55 +02:00
0e9a6dcedc Use datasource cache for backend tsdb/query endpoint (#13266)
fix: use datasource cache for backend datasources
2018-09-14 09:30:32 +02:00
beddfdd86b add api route for retrieving teams of signed in user 2018-08-08 10:26:05 +02:00
c6e9ffb168 Use url params for explore state
- putting state in the path components led to 400 on reload
- use `/explore?state=JSON` instead
2018-07-17 12:56:05 +02:00
6286c31d4b refactoring: making api wrap public 2018-07-02 14:13:18 +02:00
10e86eda69 fix: #12461 introduced issues with route registration ordering, adding plugin static routes before plugins package had been initiated (#12474) 2018-07-01 23:35:50 -07:00
861af4cb97 Improve extensions build. (#12461)
* enable ee build on pr/master

* step1: of including group sync

* disable commit pinning for now

* fixes broken build

* enable team to ldap group sync

* avoid returning error for missing external handler

* services: allow routes to be added before http server start

* services: allows services to add their own migrations

* moves db migrations to ee code base

* build using master branch in ee

* disable enterprise build in .bra.toml

[skip ci]

* removes team sync extensions

* removes commented line
2018-07-01 07:01:43 -07:00
dbfafa1cb5 routing: allows routes to be added to existing groups
this enables services to add routing to ex /api
without causing conflicts.
2018-06-25 16:50:27 +02:00
0c45ee63a9 Guard /explore by editor role on the backend 2018-05-31 11:26:24 +02:00
80d694d205 Backend image rendering as plugin (#11966)
* rendering: headless chrome progress

* renderer: minor change

* grpc: version hell

* updated grpc libs

* wip: minor progess

* rendering: new image rendering plugin is starting to work

* feat: now phantomjs works as well and updated alerting to use new rendering service

* refactor: renamed renderer package and service to rendering to make renderer name less confusing (rendering is internal service that handles the renderer plugin now)

* rendering: now render key is passed and render auth is working in plugin mode

* removed unneeded lines from gitignore

* rendering: now plugin mode supports waiting for all panels to complete rendering

* fix: LastSeenAt fix for render calls, was not set which causes a lot of updates to Last Seen at during rendering, this should fix sqlite db locked issues in seen in previous releases

* change: changed render tz url parameter to use proper timezone name as chrome does not handle UTC offset TZ values

* fix: another update to tz param generation

* renderer: added http mode to renderer service, new ini setting [rendering] server_url
2018-05-24 15:26:27 +02:00
417db13efb Fix dashboard snapshot deletion (#12025)
* fix issue deleting dashboard snapshots by deleteKey, add dedicated endopoint for authenticated requests, update frontend, tests & docs.
2018-05-24 08:55:16 +02:00
28f7b6dad1 Enable Grafana extensions at build time. (#11752)
* extensions: import and build

* bus: use predefined error

* enterprise: build script for enterprise packages

* poc: auto registering services and dependency injection

(cherry picked from commit b5b1ef875f905473af41e49f8071cb9028edc845)

* poc: backend services registry progress

(cherry picked from commit 97be69725881241bfbf1e7adf0e66801d6b0af3d)

* poc: minor update

(cherry picked from commit 03d7a6888b81403f458b94305792e075568f0794)

* ioc: introduce manuel ioc

* enterprise: adds setting for enterprise

* build: test and build specific ee commit

* cleanup: test testing code

* removes example hello service
2018-04-27 13:41:58 +02:00