90 Commits

Author SHA1 Message Date
Klaus Zanders 835f503b6f Preload the detail 2026-04-14 09:58:07 +02:00
Klaus Zanders e74ae25d8e Add page layout for organization page 2026-04-14 09:57:59 +02:00
Klaus Zanders 9dd52bf358 Add nested group display in the UI 2026-03-17 10:26:38 +01:00
Klaus Zanders 2b7a3c819c Find more resources via visible scope 2026-02-09 15:07:50 +01:00
Klaus Zanders 856b556967 Fix check for view_members permission when viewing groups 2026-01-16 10:35:13 +01:00
Oliver Günther 14192a74c3 Replace confirm with turbo-confirm, method with turbo-method 2025-09-26 09:15:04 +02:00
Jan Sandbrink 706fb7c645 Replace user_ids param with (add|remove|replace)_user_ids
Previously it was always necessary to provide a full list of users when calling the service.
Now it's also possible to provide a delta that should be achieved.

This allows to simplify calls to the service, when only the delta is known (e.g. "add this user").
It also makes those calls safer, since the internals of the Groups::UpdateService are already locked
through an advisory lock (via BaseContracted), thus concurrent changes to group memberships are serialized
properly inside the service. However, previous implementations would have read the current members of a group
outside of the service scope, where race conditions could have occured.
2025-07-31 09:32:26 +02:00
Alexander Brandon Coles f15be6e07f Freeze string literals in app/controllers
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/controllers
2025-07-18 17:51:00 +01:00
Henriette Darge ee8452282a [63485] Remove show_local_breadcrumb and default_breadcrumb (#18663)
* add a new helper for breadcrumb in wiki page

* set page header in destroy page

* set page header in edit page

* set page header in history and rename and edit parent pages

* change toolbar items into page header items

* add new wiki action to sub header

* remove version edit page which is not in use any more

* add export as a menu item of the header

* fix rubocup errors

* fix failing tests

* replace page header in annotate page

* replace page header in diff page

* add page header in select menu page

* fix rubocup errors

* fix errors on rename test

* fix errors on selecting items from toolbar

* fix errors on tests for child pages

* set correct permission for configure menu item

* replace page header in summary page

* replace page header in summary details page

* edit docs of sub header

* add page header in wiki new page

* remove controller and a route for edit method

* undo changes for docs of sub header

* extract header in show page into a new component

* use helper method in header component

* add wiki module to the breadcrumb

* rename page header component for wiki page

* simplify how lock and lock implemented

* extract sub header

* remove wiki title from header of history page

* fix page header in new page

* use page.find_test_selector in test

* fix failing test for summary page

* fix failing test for wiki child pages

* change the summary test

* use test selector for page header title

* undo changes for activate user in admin

* use test selector in adding editing history test

* use test selector in attachment upload test

* use test selector in child pages tests

* use test selector in wiki menu items tests

* change test selector for breadcrumbs

* extract conditions to show edit button into a method

* extract conditions to show rollback action menu item into a method

* extract conditions to show create button into a method

* fix duplicated code in test

* Remove outdated `show_local_breadcrumb` method which is replaced by the Primer::PageHeader breadcrumb

* Remove `default_breadcrumb` method as it serves no prupose any more

* Remove the old breadcrumb and its hook completely

* remove breadcrumbs path from rename

* fix translations errors in storages

* undo changes on translations

* remove default breadcrumbs in time tracking controller

---------

Co-authored-by: Behrokh Satarnejad <b.satarnejad@openproject.com>
Co-authored-by: Behrokh Satarnejad <62008897+bsatarnejad@users.noreply.github.com>
2025-04-23 10:40:43 +02:00
Oliver Günther fa99c5bef6 Render with status: :unprocessable_entity 2024-10-11 08:42:58 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Henriette Darge 5af5c71a71 Introduce PageHeader component in Administration -> User settings -> Groups 2024-07-15 11:19:52 +02:00
ulferts 25dde2a83e explicitly allow admin access 2024-06-21 10:12:05 +02:00
ulferts fdbd6b6d5a forcing to specify allowed actions when forfeiting authorization check 2024-06-11 10:29:22 +02:00
ulferts ed5a162230 allow actions to be called on those not using default authorization before_actions 2024-06-07 16:55:40 +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 180f72df2c Replace allowed_to_globally? -> allowed_in_any_project? / allowed_in_any_work_package? 2023-10-23 15:05:37 +02:00
ulferts beb8c0c4ef remove group xml api 2023-05-11 11:07:36 +02:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +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
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther 8984b989c6 Add include_gon to base template
This will avoid needing to identify in templates whether gon is already
present, and will ensure it can be used.
2022-02-09 14:59:04 +01:00
Christophe Bliard ff4367b084 Avoid instance variable in view helpers
rubocop rule Rails/HelperInstanceVariable
2022-01-31 09:32:41 +01:00
Christophe Bliard 551885c303 Harmonize params name for membership creation and update
This will allow further factorization
2022-01-31 09:32:37 +01:00
Christophe Bliard 15f00ffe84 Add 'Global role' tab for groups
Global roles can now be added, update, and removed for a group
2022-01-31 09:32:36 +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 9fa5599392 Feature/member notifications (#8958)
* spec with correctly scoped links

* move db check into own file - fix deprecation

* basic spec for member creation service

* use constants for all notifications

* send an OP notification after member has been created

* send an OP notification after member has been updated

* mails on group member added

Depending on whether the membership existed before or not, an updated or
a created notification is send. This is done asynchronously.

* move all mail sender background jobs into namespace

* wip

* wip

* correct handling group member notifications

* add setting enable/disable mail sending on member alterations

* use services in members controller

* move Notifiable to OpenProject

* remove member after save hooks

* cleanup/testing/linting

* render member mails in receiver locale

* remove add_member! method

* use mailer layout for all mailers

* Update app/services/groups/cleanup_inherited_roles_service.rb

Co-authored-by: Oliver Günther <mail@oliverguenther.de>

* use around callback to avoid prepending

* handle nil params

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2021-04-20 13:45:42 +02:00
ulferts b8ca382d34 Group API (#9034)
* include group members into resource

* GET /api/v3/groups endpoint

* POST /api/v3/groups

* PATCH /api/v3/groups/:id

* DELETE /api/v3/groups/:id
2021-02-23 09:59:49 +01:00
Oliver Günther 9acd19de46 Revert removal of groups XML responses (#9024) 2021-02-19 08:08:38 +01:00
Oliver Günther f4dfd6c6c6 [36238] Extract and fix user references in other objects (#9007)
* Move replacing invalid references into separate job for principals

* Write migration to remove existing invalid custom values and responsible

* Fix other specs

* Fix other specs

* rewrite replacing user in records

* consolidate principal deletion

* include placeholder users in spec

Co-authored-by: ulferts <jens.ulferts@googlemail.com>
2021-02-16 08:46:53 +01:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
Oliver Günther 769be47723 [35815] Add visible show page for all users to groups (#8949)
To that end, move the show group routes out of /admin, that requires we
use a different path helper for it as `group_path` will still link to
the first admin resource.
2021-02-01 09:25:12 +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 5968c0b18a Fix/replace custom i18n function (#8681)
* replace custom i18n function calls

* remove custom i18n method
2020-09-16 11:26:15 +02:00
Oliver Günther d93ff52a27 Handle add_users with a separate service with CTE 2020-05-05 13:10:07 +02:00
Inga Mai cf55ffbbf9 Add labels to js-en.yml 2020-01-17 14:30:20 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts c83ba63640 Revert revert unwanted in dev branch
This reverts commit b05a8f7b54.

The release/10 branch received a revert that was applied after changes
from dev unwillingly where merged into it. But when merging release/10.0
back into dev, that revert was also applied to dev where the changes are
indeed wanted. So we revert the revert for dev.
2019-09-20 08:36:05 +02:00
Oliver Günther b05a8f7b54 Revert "[31080] Trigger wpEvent after custom action" 2019-09-18 14:28:33 +02:00
Oliver Günther 693bd7760a Replace deprecated update_attribute with update
`update_attributes` was deprecated in Rails 6
2019-09-16 14:24:13 +02:00
Henriette Dinger 1d608d6d0f Let autocompleter handle additional filters given as input 2019-08-13 10:09:01 +02:00
Henriette Dinger 7d027b64b3 Remove route which became obsolete because of the replaced user autocompleter 2019-08-09 09:50:29 +02:00
Henriette Dinger 9c2a920955 Correct group filter && and apply filters to userAutocompleter to search only for members who are not yet in the group 2019-08-09 09:40:48 +02:00
Oliver Günther f86abae9eb Enforce Arel.sql for string order, pluck 2018-12-03 10:31:57 +01:00
Oliver Günther 2e1d6e1218 [28066] Fix duplicate label names in membership create/edit
https://community.openproject.com/wp/28066
2018-07-24 13:14:24 +02:00
Oliver Günther c894369ea9 [27500][27501] Fix invalid variable in GroupsController
[ci skip]
2018-04-23 15:24:18 +02:00