37 Commits

Author SHA1 Message Date
Klaus Zanders 56e3d6214d Do not show Resource Management permissions in Role Editor 2026-05-05 15:30:51 +02:00
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00
Ivan Kuchin c86f3644e3 replace reject with include? with difference
`disabled_project_modules` is not cached, so using diff will at least
not repeat filtering/mapping of all modules
2025-01-16 15:05:36 +01:00
Ivan Kuchin fefc66bf9b allow available_project_modules to be sorted 2025-01-16 14:54:06 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Klaus Zanders 9f1a02f7fa Add ProejctQueryRole as needed 2024-06-17 09:31:42 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Klaus Zanders 36bdbf64bf Add a :edit_attribute_help_texts permission that was previously implied 2023-11-02 10:00:52 +01:00
ulferts f7548f701c avoid raising error on disabled permissions 2023-10-11 13:43:40 +02:00
Klaus Zanders 0bd445e4ba Fixes Performance/Detect offenses 2023-09-06 10:59:32 +02:00
Aaron Contreras 5d68445405 Improvement: Access .permissions instead of @mapped_permissions
I can't see a use-case in which we'd want to assign, consider or
take into account the subset of permissions which are not enabled
during boot or reload.

This commit standardizes access/manipulation to those permissions which
are marked as responding to `#enabled? => truthy`.
subset of non-enabled permissions
2023-08-31 10:00:23 -05:00
Aaron Contreras 930cf32a22 Add .project_permissions method to OpenProject::AccessControl
* Allows querying specifically for project permissions.

* Adds spec to ensure permissions that are permissible on multiple
  role types show up in their appropriate query.
2023-08-31 08:34:22 -05:00
Aaron Contreras e388dc6eca Add .project_permissions method to OpenProject::AccessControl
* Allows querying specifically for project permissions.
2023-08-31 08:34:22 -05:00
Henriette Darge 759eeb73aa Show "EE" icon in the project module overview 2023-07-06 09:09:37 +02:00
Christophe Bliard 6d5f9e36fc Add 'Project details activity' menu entry
Added to the Project details widget on project overview page.

Displaying the menu entry conditionally depending on the activity module
being activated is done through a public permission. Capabilities
endpoint has been extended to include actions from public permissions.
2023-01-23 09:31:21 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Dombi Attila d32be7fc0a Improvement #1 2022-08-15 16:32:34 +02:00
Oliver Günther 843bc45897 Clear caches when mapping new modules in access control 2022-05-18 14:32:01 +02:00
Christophe Bliard 76f9aa760d reevaluate module availability on each call 2022-04-01 13:20:31 +02:00
Christophe Bliard 2356dfc133 test that :if in module declaration controls module availability
and make rubocop happier
2022-04-01 09:45:22 +02:00
Christophe Bliard a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01:00
ulferts a775e9e5d8 introduce permission governing whether work packages can be assigned 2022-03-03 11:36:58 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
Markus Kahl 8c8b8bbfa7 create backups via UI (#9136)
* create backups via UI

* Fix import of modal service

* introduced backup token and addressed remaining comments

* allow disabling permissions

* improvements

- only make user wait to use backup token in if really necessary
- notify admins of new backup token
- disable 'include attachments' option in UI if unavailable
- documentation
- misc

* spec fixes

* fixed feature spec

* allow setting capybara host in every case

* removed unused style file

* addressed review feedback, added further feature specs

* polish (code climate)

* Avoid empty attachments

* Don't raise filesize validation for internal exports

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2021-04-28 08:51:43 +01:00
ulferts 4bf7a26eb1 Capabilities API (#9083)
* Capabilities API

* introduce auxilliary capability model

* capability model and query

* render in sql

* fix pagination

* introduce sql representer

* extract abstract sql representer class

* remove yet unused methods

* abstract sql collection representer

* contract_actions as part of permissions

* filter for capability id - used in GET

* id filter validation

* remove unused representer

* remove unused wp representer

* reuse renaming class

* add spec for access control

* add principal filter to capability

* add context filter

* extract capability sql into scope

* admin gets all capabilities

* require to have one filter set to keep performance bearable

* consider active project modules for capabilities

* limit capability based on principal visiblity and user state

* rework capability to be tableless

* spec not being allowed to see on request level

* add actions to capability representer

* add action api

* extract sql index endpoint

* remove unused class

* prepare sending signaling error - not yet frontend exposed

* extract show endpoint for sql rendered responses

* use UNION for better performance

* include navigation links on collections

* remove string replacements

* extract collection representer into hal sql module

* no capabilities when blocked

* remove commented out code
2021-03-23 21:45:38 +01:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
ulferts 7f34799a33 Chore/reimplement global roles (#8730)
* remove outdated docs/code

* global memberships are just memberships

* rewire global membership creation/update/deletion

* delete no longer required code and patches

* move code to core

* move specs to core

* completely remove global roles in the form of a plugin

* adapt specs

* remove unused methods

* migrate existing data

* adapt membership representer to changed timestamps

* global memberships available via API

* implements created/update_at filters on memberships

* update member on roles being added/removed

* specify default value for created_at

* fix project permission check and validation on members

* adapt membership schema

* adapt usage of sort by on members widget

* support created/updated_on for api sort and filter
2020-12-03 09:47:50 +01:00
ulferts 112f8c1be3 hide bim permission group in role view if bim disabled 2020-03-06 09:58:00 +01:00
Oliver Günther 52958b1ac2 Allow to disable (= hide) bim module 2020-02-21 08:45:55 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts 7e725513ff linting 2019-05-31 20:36:33 +02:00
ulferts ac287032d0 add dependency information and check to permissions 2019-05-31 20:36:32 +02:00
ulferts f1142c6654 move AccessControl into OpenProject namespace 2019-05-31 20:36:32 +02:00