12 Commits

Author SHA1 Message Date
Jens Ulferts 033faf78dc Fix/add visibibility scope to capabilities (#21993)
* introduce visible scope to capabilities and apply it to CapabilityQuery

* remove redundant scope

Capability has the `.default` scope as its default scope

* adding spec on show action for unreadable capability

* reuse existing shared example

* move Principal.visible check into Capability.visible
2026-02-16 09:29:49 +01:00
Alexander Brandon Coles d17da65477 Freeze string literals in app/models
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/models
2025-07-22 18:26:13 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +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
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01: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
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
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