forked from External/greenlight
Fixed issues with rubocop (#916)
This commit is contained in:
parent
09de6b6739
commit
c13a83a3f3
|
@ -39,9 +39,7 @@ class Ability
|
||||||
:approve, :invite, :reset, :undelete], :admin
|
:approve, :invite, :reset, :undelete], :admin
|
||||||
end
|
end
|
||||||
|
|
||||||
if highest_role.get_permission("can_manage_rooms_recordings")
|
can [:index, :server_recordings, :server_rooms], :admin if highest_role.get_permission("can_manage_rooms_recordings")
|
||||||
can [:index, :server_recordings, :server_rooms], :admin
|
|
||||||
end
|
|
||||||
|
|
||||||
if !highest_role.get_permission("can_edit_site_settings") && !highest_role.get_permission("can_edit_roles") &&
|
if !highest_role.get_permission("can_edit_site_settings") && !highest_role.get_permission("can_edit_roles") &&
|
||||||
!highest_role.get_permission("can_manage_users") && !highest_role.get_permission("can_manage_rooms_recordings")
|
!highest_role.get_permission("can_manage_users") && !highest_role.get_permission("can_manage_rooms_recordings")
|
||||||
|
|
|
@ -48,9 +48,7 @@ class Room < ApplicationRecord
|
||||||
# Include the owner of the table
|
# Include the owner of the table
|
||||||
table = joins(:owner)
|
table = joins(:owner)
|
||||||
|
|
||||||
if table.column_names.include?(column) || column == "users.name"
|
return table.order(Arel.sql("#{column} #{direction}")) if table.column_names.include?(column) || column == "users.name"
|
||||||
return table.order(Arel.sql("#{column} #{direction}"))
|
|
||||||
end
|
|
||||||
|
|
||||||
table
|
table
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue