diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/models/todo.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r-- | app/models/todo.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb index 32ec4accb4b..7bbdf321269 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -204,10 +204,18 @@ class Todo < ApplicationRecord action == MEMBER_ACCESS_REQUESTED end - def access_request_url - return "" unless self.target_type == 'Namespace' + def member_access_type + target.class.name.downcase + end - Gitlab::Routing.url_helpers.group_group_members_url(self.target, tab: 'access_requests') + def access_request_url(only_path: false) + if target.instance_of? Group + Gitlab::Routing.url_helpers.group_group_members_url(self.target, tab: 'access_requests', only_path: only_path) + elsif target.instance_of? Project + Gitlab::Routing.url_helpers.project_project_members_url(self.target, tab: 'access_requests', only_path: only_path) + else + "" + end end def done? |