summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-11-03 06:00:40 +0000
committerGo MAEDA <maeda@farend.jp>2024-11-03 06:00:40 +0000
commit5cf31e5e9598380c6142aa6e9ef0fc13983ff861 (patch)
tree5ff409982baf8f722a125132ca41f5241a8175a3 /app/models
parentac13db38ee10b32c9c480a99b742cec8b642dea0 (diff)
downloadredmine-5cf31e5e9598380c6142aa6e9ef0fc13983ff861.tar.gz
redmine-5cf31e5e9598380c6142aa6e9ef0fc13983ff861.zip
Merged r23178 from trunk to 5.0-stable (#41465).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@23180 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue_import.rb2
-rw-r--r--app/models/time_entry_import.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue_import.rb b/app/models/issue_import.rb
index d7e0919d3..57305e38f 100644
--- a/app/models/issue_import.rb
+++ b/app/models/issue_import.rb
@@ -50,7 +50,7 @@ class IssueImport < Import
end
def self.authorized?(user)
- user.allowed_to?(:import_issues, nil, :global => true)
+ user.allowed_to?(:import_issues, nil, :global => true) && user.allowed_to?(:add_issues, nil, :global => true)
end
# Returns the objects that were imported
diff --git a/app/models/time_entry_import.rb b/app/models/time_entry_import.rb
index 572a0c356..cf9d9d4f4 100644
--- a/app/models/time_entry_import.rb
+++ b/app/models/time_entry_import.rb
@@ -32,7 +32,7 @@ class TimeEntryImport < Import
end
def self.authorized?(user)
- user.allowed_to?(:import_time_entries, nil, :global => true)
+ user.allowed_to?(:import_time_entries, nil, :global => true) && user.allowed_to?(:log_time, nil, :global => true)
end
# Returns the objects that were imported