Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1614732
20180726141603_add_admin_to_users.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Mar 21, 3:16 AM
Size
234 B
Mime Type
text/x-ruby
Expires
Mon, Mar 23, 3:16 AM (7 h, 47 m)
Engine
blob
Format
Raw Data
Handle
354171
Attached To
rWEBDNS WebDNS (edet4)
20180726141603_add_admin_to_users.rb
View Options
class
AddAdminToUsers
<
ActiveRecord
::
Migration
def
change
add_column
:users
,
:admin
,
:boolean
User
.
find_each
do
|
u
|
u
.
admin
=
u
.
groups
.
where
(
name
:
WebDNS
.
settings
[
:admin_group
]
)
.
exists?
u
.
save
end
end
end
Event Timeline
Log In to Comment