Commit Graph

56 Commits

Author SHA1 Message Date
Roman Perekhod
afd9ec67fe Fix the settings metedata tests 2024-06-13 19:13:46 +02:00
Ralf Haferkamp
d7f10f38a0 settings: Add ListRoleAssignmentByRole
This adds the implementation for ListRolesAssignments by role-id to the
metadata backend. Because of the current layout of the account folders
and assignment files this is currently still very inefficient.

Related Issue: #8939
2024-06-04 11:00:09 +02:00
Ralf Haferkamp
5b38fa149d settings: Remove deprecated filesystem backend
We changed the default to `metadata` before the 2.0 release. This PR
alos removes the associated `SETTINGS_STORE_TYPE` and
`SETTINGS_DATA_PATH` settings as they are no longer needed with
`metadata` as the only available backend.
2024-05-13 14:50:02 +02:00
Michael Barz
4960f8c42d tests: add unit tests for admin role assignment 2024-04-19 11:22:10 +02:00
Michael Barz
ad29d7da3e fix: always assign the admin role to the default admin 2024-04-19 10:08:21 +02:00
jkoberg
ef3c214af6 use correct structure when ocis init
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-27 15:22:56 +01:00
jkoberg
20f77d4b5b add a hidden role for service accounts
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-21 12:41:42 +01:00
Benedikt Kulmann
82785184dc Merge pull request #8018 from owncloud/add-chinese-language
feat: allow settings service to store "zh" as language value
2023-12-19 20:17:12 +01:00
Benedikt Kulmann
b75dda29a9 feat: allow settings service to store "zh" as language value 2023-12-19 15:47:13 +01:00
jkoberg
de4f9d78f4 allow authentication for stores
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-19 10:44:05 +01:00
Roman Perekhod
d5130c3c37 Merge pull request #7976 from 2403905/issue-7931
[full-ci] remove the permissions of a role with duplicate ID
2023-12-18 09:20:20 +01:00
kobergj
423c28b298 improve store readmes
Co-authored-by: Martin <github@diemattels.at>
2023-12-15 13:25:10 +01:00
Roman Perekhod
737e2962bb [full-ci] remove the permissions of a role with duplicate ID 2023-12-14 12:30:34 +01:00
Benedikt Kulmann
bd219cad88 feat: add more accepted languages
Adding languages to the list of accepted languages which have 70% or
more translation coverage in transifex + swedish by request of a
community member who promised to help with translations.
2023-11-21 06:31:57 +01:00
jkoberg
66ff22835d add new permissions
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-11-10 13:02:21 +01:00
jkoberg
73f87a003c refactor settings/pkg/store/defaults
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-11-10 13:02:21 +01:00
Michael Barz
75819ba6ad add new permission to delete public link password 2023-10-23 12:46:47 +02:00
Roman Perekhod
7f6c832356 the default language added to the setting service (#7417)
* the default language added to the setting service

Co-authored-by: Martin <github@diemattels.at>

---------

Co-authored-by: Roman Perekhod <rperekhod@owncloud.com>
Co-authored-by: Martin <github@diemattels.at>
2023-10-09 15:31:17 +02:00
Jörn Friedrich Dreyer
1a874ca89a store: decrease log level (#7329)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-09-22 09:33:28 +02:00
jkoberg
8e1b033a63 auto-accept shares in frontend service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-09-06 15:32:31 +02:00
jkoberg
0bc0972b0b add admin service account
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-08-31 12:11:43 +02:00
Michael Barz
fc807299b6 change role name to user light 2023-06-06 14:58:45 +02:00
jkoberg
b41b1ec4cb rename permssions
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-05-30 10:35:51 +02:00
Phil Davis
f19830e919 Reword 'allows to' sentences 2023-05-18 09:46:25 +05:45
jkoberg
03b31b9580 give spaceadmin delete-all-spaces
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-05-17 19:31:01 +02:00
Martin
98c6e3a7e0 Update services/settings/pkg/store/defaults/defaults.go
Co-authored-by: kobergj <jkoberg@owncloud.com>
2023-05-17 10:44:50 +02:00
mmattel
7fd9b30258 [docs-only] Fix settings typos 2023-05-17 10:35:40 +02:00
Michael Barz
02fe615e1c update the default roles 2023-05-15 22:17:50 +02:00
Ralf Haferkamp
df5edec36b settings: User go-micro/store for cachiing
The previous implementation was using an unlimited TTL which would cause
problems in scale out deployments where multiple instances of the settings
service are running.

Fixes: #5067
2023-05-12 14:49:19 +02:00
Ralf Haferkamp
18bb3dbaca settings: Instanciate only a single instance of the ServiceHandler/Store
Share the same instance between the HTTP and the GRPC service. This is
in preparation for moving the cache of the metadata storage backend to a
go-micro/store based implementation. By sharing the same service instance in
the HTTP and GRPC services we can avoid the usage of global variables for the
caches, which will make the move to the go-micro/store implementation simpler.
2023-05-12 14:49:19 +02:00
jkoberg
7d13ce519d better naming for setting and permission
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-04-27 10:35:22 +02:00
jkoberg
3bf24746e6 add new setting to disable emails
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-04-26 15:33:55 +02:00
Roman Perekhod
6cf09321c9 Determine the users preferred language to translate emails via Transifex. #6087 2023-04-21 16:30:48 +02:00
jkoberg
cdddd16c0a add permission to change space quota
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-03-17 12:51:26 +01:00
Ralf Haferkamp
46acc8f1ee Fix default assigments for demo and admin users
When using metadata backend the default role assignments for the demo users
where create independed of whether the demo users are were actually requested
to be created. This also fixes the name of the env var for enabling the demo
users. This was missed when moving from the accounts service to graph/idm for
user management.
2023-03-14 16:08:37 +01:00
Ralf Haferkamp
dbe40bd7c7 Avoid repeated default role assignments
When using the metadata storage (the current default) the default role
assignments were recreated at every start of the settings service. Leading to
duplicated role assignments

Fixes: #3432
2023-03-14 16:08:37 +01:00
David Christofas
b8470d567d add new permission 'publiclink.create' and assign it to the 'Admin', 'SpaceAdmin' and 'User' roles 2023-03-01 11:53:39 +01:00
Michael Barz
eb2347e1db Merge pull request #5589 from owncloud/settings-roles
make the default settings bundles part of the config
2023-02-16 16:05:29 +01:00
Michael Barz
29501b2cfe make the default settings bundles part of the config 2023-02-16 13:24:31 +01:00
David Christofas
7c17ddb0b0 add a permission check to the logo upload 2023-02-13 13:48:39 +01:00
kobergj
b7a5e1c29e use correct permission (#5458)
Signed-off-by: jkoberg <jkoberg@owncloud.com>

Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-26 11:16:43 +01:00
jkoberg
b2067575a9 bump reva
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-25 15:39:41 +01:00
jkoberg
1a69388e14 add new permissions
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-25 15:25:54 +01:00
Jörn Friedrich Dreyer
078698fdf4 graph: add appRoleAssignments and minimal application resource (#5318)
* bump libregraph-go lib

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add appRoleAssignment stubs

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add get application stub

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fetch appRoles for application from settings service

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* initial list appRoleAssignments implementation

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* initial create appRoleAssignment implementation, extract assignmentToAppRoleAssignment, configurable app id and displayname

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* initial delete appRoleAssignment implementation, changed error handling and logging

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* initial expand appRoleAssignment on users

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* test user expand appRoleAssignment

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* test appRoleAssignment

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix education test by actually using the mocked roleManager

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* test getapplication

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* list assignments

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* use common not exists error handling

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* default to just 'ownCloud Infinite Scale' as application name

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix store_test

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* roll application uuid on init

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix tests

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* extract method

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* Apply suggestions from code review

Co-authored-by: Michael Barz <mbarz@owncloud.com>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Michael Barz <mbarz@owncloud.com>
2023-01-12 16:09:34 +01:00
David Christofas
efe1fc52e0 fix nilerr bugs 2022-12-21 14:45:50 +01:00
Jörn Friedrich Dreyer
53d15d329e remove deprecated use of ioutil (#5205)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-12-08 14:44:53 +01:00
Jörn Friedrich Dreyer
7443a9a225 Make permission and role ids unique (#5051)
* make permission ids unique

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* deduplicate roleids after listing permissions

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-11-15 16:51:49 +01:00
Ralf Haferkamp
4971330477 Remove no longer needed bootstrap code (#5057)
This we moved the settings service to the metadata storage with its
own gateway and permissions service, we no longer need the hardcoded
initial replies in order to bootstrap the role assignments.

This fixes a panic in the settings service when the first request to
the service is a read request on anything else but an existing role or
assignment.
2022-11-15 16:51:10 +01:00
Willy Kloucek
ca5affd9f3 fix comment 2022-10-19 10:25:54 +02:00
Willy Kloucek
ad0924d874 move the language-read-write permission's id and name into a const 2022-10-19 09:00:33 +02:00