forked from External/greenlight
GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299)
* First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms
This commit is contained in:
@ -69,7 +69,7 @@ class RoomsController < ApplicationController
|
||||
|
||||
# If its the current user's room
|
||||
if current_user && (@room.owned_by?(current_user) || @shared_room)
|
||||
if current_user.highest_priority_role.get_permission("can_create_rooms")
|
||||
if current_user.role.get_permission("can_create_rooms")
|
||||
# User is allowed to have rooms
|
||||
@search, @order_column, @order_direction, recs =
|
||||
recordings(@room.bbb_id, params.permit(:search, :column, :direction), true)
|
||||
|
Reference in New Issue
Block a user