46 Commits

Author SHA1 Message Date
Klaus Zanders f2f2ecca44 Refactor views for user administration to be correctly in the users controller, add feature specs 2026-03-06 13:29:09 +01:00
Klaus Zanders 396d899dc3 Add interaction to calendar 2026-03-06 13:29:05 +01:00
Klaus Zanders d3d693f239 Implement editing and adding of non working times 2026-03-06 13:28:53 +01:00
Klaus Zanders 727cb945e8 Refactor UserNonWorkingDay into a model that covers date ranges 2026-03-06 13:28:35 +01:00
Klaus Zanders 26293ca87f Implement form for working hours 2026-03-06 13:28:27 +01:00
Klaus Zanders 83a92ba250 Fix display of history to include current, unique constraint 2026-03-06 13:28:22 +01:00
Klaus Zanders e32a3f65ff Implement frontend for managing working hours 2026-03-06 13:28:20 +01:00
Klaus Zanders 5959386860 Add feature flag for working times 2026-03-06 13:28:06 +01:00
Klaus Zanders 061adf07b7 Add controllers to allow modifying resources for other users 2026-03-06 13:28:04 +01:00
Klaus Zanders c212df5b81 Use more visible scoping for users 2026-02-09 15:07:45 +01:00
Oliver Günther 0f6e9f2b93 Prevent invites before validation 2025-10-21 10:01:34 +02:00
Oliver Günther 3cd7157404 Add warning if user does not have permission in current project, but others 2025-10-21 10:01:30 +02:00
Oliver Günther 18d5acb274 Adapt invite from angular 2025-10-21 10:01:28 +02:00
Oliver Günther 3b0a489bd9 Add message and invite 2025-10-21 10:01:26 +02:00
Oliver Günther 8dd39c9f9b Allow invitations 2025-10-21 10:01:25 +02:00
Oliver Günther b5758175a0 Add principal form 2025-10-21 10:01:23 +02:00
Oliver Günther cacc7e8090 Primerize invitation dialog 2025-10-21 10:01:23 +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
Dombi Attila 10dc5538a2 [#63386] Use rescue_from ActiveRecord::RecordNotFound
https://community.openproject.org/work_packages/63386
2025-04-14 13:44:28 +03:00
Tobias Dillmann af3b72005d [#55581] remove unneeded permission 2024-11-29 15:19:45 +01:00
Tobias Dillmann 8f54110dca frozen_string_literal 2024-11-29 15:19:44 +01:00
Tobias Dillmann fe106c3396 [#55581] Users::HoverCardComponent 2024-11-29 15:19:30 +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
Oliver Günther bbeae32698 [35508] Add global permission to manage placeholder users (#9000)
* Add global permission to manage (but not delete) placeholders

https://community.openproject.com/work_packages/35508

* Restore breadcrumbs for non-show routes

* Remove permissions to memberships for add_placeholder_user permission

* Allow non-admins with global permission to access membership

* Remove permissions to memberships for add_placeholder_user permission

* Rename shared_examples for admin contract validations

Co-authored-by: ulferts <jens.ulferts@googlemail.com>
2021-02-16 14:16:35 +01:00
Wieland Lindenthal a18954b2c9 Placeholder user services and administration (#8944)
* Adding placeholder user contracts

* Adding create, update, and delete services for placeholder users

* WIP: Adding Placeholder User contract specs [ci skip]

* Extract contract validation into common helper

* Add common validation in BaseContract + common example for admin checks

* Introduce common ModelContract shared context for validations

* WIP: PlaceholderUser controller, i18n, and routes [ci skip]

* Placeholder users index page and query

- moved all group related scopes from User to Principal to make them also available in PlaceholderUser.

* end

* Create PlaceholderUser

* Feature spec for editing a placeholder user

* Manage PlaceholderUser memberships

The managment of memberships is pretty similar for User and PlaceholderUser. This commit extacts the similarities and uses them for both.

* General partial and show view for PlaceholderUser

* Delete obosolete partial

* Allow RequireAdminGuard to be used as a module function

* Fix I18n for confirmation text

* Smaller code improvements

* Fix: Syntax for accessing status enums was wrong.

* Use UpdateService for updating a placeholder user

* Add spec for PlaceholderUsersController

* First code improvements after code review.

- more improvements to come.

* Further code improvements after review

... still more to come

* Correct namespace of delete service

* Fix: Make placeholder user contract validate

* Remove :type attribute from base contract of User and PlaceholerUser

...and add it to the CreateContracts.
Also add type validations.

Further extract shared examples for placeholder user attribute
validation

* Refactor: Extract membership hook calls to helper

* Fix redirect paths for membership controllers

* Specs already present in shared exampels.

* Fix duplicates routes for users and placeholder users

* Fix user path

* Add attribute name and lastname

We don't need a writeable check as both are equally writable

* Replace more references to tab_edit_user_path

* Skip specs for PlaceholderUsers::DeletionService

We will tackle that service in a separate PR.

* Fix module usage of RequireAdminGuard

* Fix group filter for placeholder users

* Fix invalid reference to expect_valid

* Fix: Fix tabbed edit path for placeholder users

* Fix status filtering on users

* Linting

* Improve generalisation of individual principal filter cell

- Check for presence of groups and statuses in order
  to toggle visibility of their UI element.
- Remove groups from placeholder user controller and
  cell initialization and options

* Fix selector on groups assign

* Remove using_shared_fixtures

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2021-02-12 17:18:55 +01:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +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
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts d74dd04241 remove outdated api/atom references 2019-08-27 11:22:36 +02:00
Oliver Günther 8c477e5860 Fix more project settings related specs 2018-03-05 14:16:37 +01:00
Oliver Günther ab4f9b7ed5 Replace settings and boards remotes with actual responses 2018-03-05 07:24:44 +01:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther dae84cffb0 Extract editing member into a separate service
Would have liked to use the contract here to validate the role_ids
before they're being written to attributes, but that doesn't seem to
work.
2017-06-30 11:45:28 +02:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Oliver Günther fe0e8dd919 Rename before_filter to before_action 2016-09-06 15:40:49 +02:00
Jens Ulferts d13db6b35a replace jrs with js.erb 2016-08-29 15:41:55 +02:00
Jens Ulferts 28fc8d37b2 split memberships concerns from users controller 2016-08-29 15:41:55 +02:00