Ryan McKinley
26658d172f
Migrations: Support independent migration log for entity api ( #68511 )
2023-05-22 11:31:07 -07:00
Ryan McKinley
b2c4af16d7
Git: Update experimental workflow POC ( #60049 )
2022-12-08 13:57:33 -05:00
Tania
76372a240c
Storage: Add system users service ( #57767 )
...
* Storage: Add access for reporting
* reporting upload user per org
* add some basic comments
* Move reporting storage to enterprise
* add comments
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-11-24 15:15:32 +01:00
Sofia Papagiannaki
9855e74b92
Chore: Refactor quota service ( #58643 )
...
Chore: Refactor quota service (#57586 )
* Chore: refactore quota service
* Apply suggestions from code review
2022-11-14 21:08:10 +02:00
Sofia Papagiannaki
96cdf77995
Revert "Chore: Refactor quota service ( #57586 )" ( #58394 )
...
This reverts commit 326ea86a57
.
2022-11-08 11:52:07 +02:00
Sofia Papagiannaki
326ea86a57
Chore: Refactor quota service ( #57586 )
...
* Chore: refactore quota service
* Apply suggestions from code review
2022-11-08 10:25:34 +02:00
Kristin Laemmert
05709ce411
chore: remove sqlstore & mockstore dependencies from (most) packages ( #57087 )
...
* chore: add alias for InitTestDB and Session
Adds an alias for the sqlstore InitTestDB and Session, and updates tests using these to reduce dependencies on the sqlstore.Store.
* next pass of removing sqlstore imports
* last little bit
* remove mockstore where possible
2022-10-19 09:02:15 -04:00
Artur Wierzbicki
e19f36649f
Storage: Content
root storage ( #54929 )
...
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-09-12 18:34:46 -04:00
Artur Wierzbicki
7a340f486b
Storage: add WithContents
option to storage.Get()
( #53105 )
...
* Storage: add `WithContents` option to `storage.Get()`
* fix tests
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-08-30 15:23:16 +02:00
ying-jeanne
fe062f2eaa
Chore: Use db.DB interface instead of sqlstore ( #54358 )
...
* use db.DB interface instead of sqlstore
* make store service depends on db.DB instead of sqlstore
2022-08-26 19:07:58 -05:00
idafurjes
a14621fff6
Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx ( #53343 )
...
* Chore: Add user service method SetUsingOrg
* Chore: Add user service method GetSignedInUserWithCacheCtx
* Use method GetSignedInUserWithCacheCtx from user service
* Fix lint after rebase
* Fix lint
* Fix lint error
* roll back some changes
* Roll back changes in api and middleware
* Add xorm tags to SignedInUser ID fields
2022-08-11 13:28:55 +02:00
idafurjes
6afad51761
Move SignedInUser to user service and RoleType and Roles to org ( #53445 )
...
* Move SignedInUser to user service and RoleType and Roles to org
* Use go naming convention for roles
* Fix some imports and leftovers
* Fix ldap debug test
* Fix lint
* Fix lint 2
* Fix lint 3
* Fix type and not needed conversion
* Clean up messages in api tests
* Clean up api tests 2
2022-08-10 11:56:48 +02:00
Artur Wierzbicki
0d817987ec
Storage: move file quota check to service ( #53058 )
...
* Storage: move file quota check to service
* Fix tests
2022-08-01 22:53:44 +04:00
Artur Wierzbicki
08dabfaffc
Storage: add global resources/system ( #53000 )
...
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-07-29 15:58:47 -04:00
Selene
085ae014cd
Sync: Move ActiveTokenCount to a new service ( #52991 )
...
* Move ActiveTokenCount to a new service
* Fixing tests
* fix `RootSystem`
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-07-29 16:30:46 +02:00
Ryan McKinley
197acd73c0
Storage: support git + github backed roots ( #52192 )
2022-07-28 23:26:44 -07:00
Artur Wierzbicki
9e841ef21d
Storage: fix delete folder ( #52860 )
2022-07-28 12:27:26 +03:00
Ryan McKinley
0235fc136c
Storage: allow public access to public files ( #52849 )
2022-07-26 20:37:35 -07:00
Artur Wierzbicki
3cd43bd7ea
Storage: externalize allow_unsanitized_svg_upload
( #52703 )
2022-07-25 21:11:17 +04:00
Artur Wierzbicki
d9db155394
Storage: Mime type detection ( #52512 )
...
* Storage: implement mime type detection
* lint
2022-07-25 11:30:20 +04:00
Ryan McKinley
3bdec4d138
Storage: remove orgId from sql config ( #52426 )
2022-07-19 08:13:26 -07:00
Artur Wierzbicki
0300b1c674
Storage: branding access ( #52412 )
...
* Storage: add special users for system branding access
* Storage: explicit global org id
* Storage: initialize org storages with global org id
* Storage: add comments
* Storage: simplify - use orgId: 1 for systembranding
2022-07-19 18:47:11 +04:00
Ryan McKinley
824f12a993
Storage: Remove storageLocalUpload flag ( #52413 )
2022-07-18 10:44:42 -07:00
Artur Wierzbicki
841e5ae8ad
Storage: system/branding
storage ( #51987 )
...
* Storage: add `system` branding storage root, expose `system/branding` subfolder
* Storage: merge
2022-07-18 19:37:22 +04:00
Artur Wierzbicki
6188526e1d
Storage: use static access rules ( #52334 )
...
* Storage: use static access rules
* Storage: use static access rules
* Storage: add tests
2022-07-17 22:41:54 +04:00
Ryan McKinley
ab6cf9e94d
Storage: refactor readonly support ( #52127 )
2022-07-13 10:15:25 -07:00
Artur Wierzbicki
1d2aa7c69b
Storage: add delete
/ deleteFolder
/ createFolder
( #51887 )
...
* delete / delete folder / create folder
* add backend tests
* implement force delete
* fix merge
* lint fix
* fix delete root folder
* fix folder name validation
* fix mysql path_hash issue
* Fix returning error
2022-07-08 22:23:16 +04:00
Artur Wierzbicki
e96f67ae2e
Renderer: Add sanitize API ( #50936 )
...
* svg fun
* #50597 : add proto
* #50597 : add sanitizer methods
* #50597 : add provider
* #50597 : use sanitizer
* #50597 : use sanitizer
* update grafana to match new api
* add comments
* add capability check
* add timing
* update sanitize path
* improve log message
* strings.HasPrefix rather than filepath.IsAbs
* filepath.Clean + filepath.ToSlash for windows
* read 404
* remove `path.clean` from `getPathAndScope`
* add resp body close
* remove unneeded prop
* Update pkg/services/rendering/rendering.go
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
* remove test files
* filepath.ToSlash correct wrapping
* filepath.ToSlash correct wrapping
* filepath.ToSlash comment
* compilation error
* lint fix
* fix error message
* Update pkg/services/rendering/rendering.go
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
* add `image/svg+xml` mime type
* refactored log
* refactored log
Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-07-07 15:32:18 +04:00
Artur Wierzbicki
052132be46
Storage: simplify retrieving the file names from the response frame ( #51805 )
...
* add util method for storage list frame
* use go:embed
* remove enum
2022-07-07 10:47:05 +04:00
Ryan McKinley
4a00c7ebde
Storage: Add basic file upload management ( #50638 )
2022-07-05 10:53:41 -07:00
Artur Wierzbicki
cc4473faf3
Storage: validation and sanitization stubs ( #50523 )
...
* add `IsPathValidationError` util to fs api
* refactor storage.Upload method
* remove unused struct
* extract `RootUpload` constant
* move file validation outside of the service
* Make UploadErrorToStatusCode exported
* validation/sanitization
* refactor pathValidationError check
* refactor, rename sanitize to transform
* add a todo
* refactor
* transform -> sanitize
* lint fix
* #50608 : fix jpg/jpeg
Co-authored-by: Tania B <yalyna.ts@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-15 12:32:29 +04:00
Artur Wierzbicki
9779f684d1
Storage: refactor - decouple the Upload method from HTTP concepts ( #50378 )
...
* add `IsPathValidationError` util to fs api
* refactor storage.Upload method
* remove unused struct
* extract `RootUpload` constant
* move file validation outside of the service
* Make UploadErrorToStatusCode exported
* refactor pathValidationError check
* if -> switch
Co-authored-by: Tania B <yalyna.ts@gmail.com>
2022-06-13 21:21:50 +04:00
Artur Wierzbicki
03fe1435a0
Storage: store uploaded files in SQL rather than on the disk ( #49034 )
...
* #48259 : set up storages per org id
* #48259 : migrate to storage_sql
2022-05-21 16:55:11 -07:00
An
900d9bf9a1
FileStorage: Add upload form ( #46749 )
...
* move upload to http
* use storage from grafanads
* rever gomod changes
* fix test
* wip
* add upload func
* update upload func
* writing to uploads
* edit response from service
* use dropzone for UI
* modify response struct in service
* better read file
* set content type for svg
* restrict file types upload
* add test and clean up errors
* pass test
* fix backend lint errors
* limit type of files on FE
* add TODO for after merge
* rebase with storage changes
* comment out unused function
* update UI to not have 2 uploads
* only call upload on select
* use utils function to find * in path
* show preview on drag over
* not allowing upload of svg
* add preview to upload tab
* no console.log
* resolve conflicts
* refactor log line
* fix failing BE test
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-04-27 15:12:48 -04:00
Ryan McKinley
1cfb9a4a19
Storage: add basic storage service ( #46604 )
2022-03-17 10:19:23 -07:00