Commit Graph

13 Commits

Author SHA1 Message Date
Ieva
1fc375855c
Chore: delete team related entries for an org after the org gets deleted (#76706)
* delete team related entries for an org after the org gets deleted

* fix tests

* one more test fix
2023-10-18 10:40:26 +01:00
idafurjes
bb35f37b66
Chore: Delete org model duplicates (#60940)
* Delete org model duplicates

* Fix lint

* Move OrgDetailsDTO to org pkg
2023-01-04 16:20:26 +01:00
idafurjes
edcf359473
Chore: Copy org sqlstore methods to org store (#55825)
* Chore: Copy org sqlstore methods to org store

* Remove GetByName, add some tests

* Rename GetByNameHandler to GetByName

* Fix fake name
2022-09-27 16:53:45 +02:00
idafurjes
fb66439c3e
Chore: Add orguser methods to org service interface (#55668)
* Move role types to a separate package

* Make role type singular and remove _ from directory name

* Add orguser methods to org service

* Fix fake method
2022-09-23 07:19:34 -04:00
idafurjes
e8a60c1988
Chore: Add methods from sqlstore to org service interface (#55635)
* Chore: Copy methods from sqlstore to org store

* Rename method, add test

* Add comments of tests

* Chore: Add methods from sqlstore to org service interface

* Avoiding import cycle

* Add and remove some methods
2022-09-23 09:58:17 +02:00
idafurjes
591df92265
Chore: Copy methods from sqlstore to org store (#55615)
* Chore: Copy methods from sqlstore to org store

* Rename method, add test

* Add comments of tests
2022-09-22 19:02:55 +02:00
idafurjes
48a8b35ece
Chore: Add org methods to org service and store (#55579)
* Add org methods to org service and store

* Fix name of fake

* Remove unused fake

* Add xorm tags and half of a test

* Add cmment for clarifying missing part of test

* Add some comments about future refactors

* Rename test

* Add test for update org address
2022-09-21 18:00:18 +02:00
idafurjes
43a1d1484d
Add some org methods to org service interface (#55449)
* Add some org methods to org service interface

* Fix fake method name
2022-09-20 12:57:51 +02:00
idafurjes
7ce7c9b64c
Chore: Move SearchOrgs to org service (#55416)
* Chore: Move SearchOrgs to org service

* Fix lint

* Fix lint 2
2022-09-20 09:55:40 +02:00
ying-jeanne
4dbe0b4f02
Chore: Move updateorg out of sqlstore (#54111)
* Chore: move updateorg out of sqlstore

* fix api test
2022-08-23 12:26:21 -05:00
idafurjes
e3501dfa4d
Chore: Add Get User Profile to user and Get User Org List to org service (#53788)
* Remove delete suer from store interface

* Remove get signed in user with cache ctx from store interface

* Support options when setting up access control tests

* Fix broken tests

* Fix lint

* Add user fake to middleware

* Fix middleware tests, remove usertest being initialised twice

* Chore: Add Get User Profile to user and Get User Org List to org service

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-08-16 17:50:45 +02:00
idafurjes
17ec9cac83
Add delete user from other services/stores (#51912)
* Remove user from preferences, stars, orguser, team member

* Fix lint

* Add Delete user from org and dashboard acl

* Delete user from user auth

* Add DeleteUser to quota

* Add test files and adjust user auth store

* Rename package in wire for user auth

* Import Quota Service interface in other services

* do the same in tests

* fix lint tests

* Fix tests

* Add some tests

* Rename InsertUser and DeleteUser to InsertOrgUser and DeleteOrgUser

* Rename DeleteUser to DeleteByUser in quota

* changing a method name in few additional places

* Fix in other places

* Fix lint

* Fix tests

* Rename DeleteOrgUser to DeleteUserFromAll

* Update pkg/services/org/orgimpl/org_test.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Update pkg/services/preference/prefimpl/inmemory_test.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Rename Acl to ACL

* Fix wire after merge with main

* Move test to uni test

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-07-15 18:06:44 +02:00
idafurjes
6c43eb0b4d
Split Create User (#50502)
* Split Create User

* Use new create user and User from package user

* Add service to wire

* Making create user work

* Replace user from user pkg

* One more

* Move Insert to orguser Service/Store

* Remove unnecessary conversion

* Cleaunp

* Fix Get User and add fakes

* Fixing get org id for user logic, adding fakes and other adjustments

* Add some tests for ourguser service and store

* Fix insert org logic

* Add comment about deprecation

* Fix after merge with main

* Move orguser service/store to org service/store

* Remove orguser from wire

* Unimplement new Create user and use User from pkg user

* Fix wire generation

* Fix lint

* Fix lint - use only User and CrateUserCommand from user pkg

* Remove User and CreateUserCommand from models

* Fix lint 2
2022-06-28 14:32:25 +02:00