Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
42279725
Commit
42279725
authored
Feb 07, 2017
by
Timothy Andrew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement final round of review comments from @DouweM.
Refactor the EE::User module
parent
ed94edeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
app/models/ee/user.rb
app/models/ee/user.rb
+4
-6
No files found.
app/models/ee/user.rb
View file @
42279725
...
...
@@ -17,13 +17,11 @@ module EE
end
def
access_level
=
(
new_level
)
new_level
=
new_level
.
to_s
ym
return
unless
[
:admin
,
:auditor
,
:regular
]
.
include?
(
new_level
)
new_level
=
new_level
.
to_s
return
unless
%w(admin auditor regular)
.
include?
(
new_level
)
self
.
admin
=
self
.
auditor
=
false
self
.
admin
=
true
if
new_level
==
:admin
self
.
auditor
=
true
if
new_level
==
:auditor
self
.
admin
=
(
new_level
==
'admin'
)
self
.
auditor
=
(
new_level
==
'auditor'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment