summaryrefslogtreecommitdiff
path: root/qa/qa/resource/user.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-06 15:06:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-06 15:06:23 +0000
commit5277f8e69e935eabd3bf8c5e7833471b5bfad1d9 (patch)
tree405b231961d09fa399e7c4311235ee67a5da6727 /qa/qa/resource/user.rb
parent4dcee85bb2384604153165f1296fb86d609c71cc (diff)
downloadgitlab-ce-5277f8e69e935eabd3bf8c5e7833471b5bfad1d9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa/qa/resource/user.rb')
-rw-r--r--qa/qa/resource/user.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/qa/qa/resource/user.rb b/qa/qa/resource/user.rb
index 095233b54f0..57663afeef5 100644
--- a/qa/qa/resource/user.rb
+++ b/qa/qa/resource/user.rb
@@ -17,6 +17,10 @@ module QA
@unique_id = SecureRandom.hex(8)
end
+ def admin?
+ api_resource&.dig(:is_admin) || false
+ end
+
def username
@username || "qa-user-#{unique_id}"
end