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:
@@ -43,7 +43,7 @@ describe ApplicationController do
|
||||
end
|
||||
|
||||
it "redirects a banned user to a 401 and logs them out" do
|
||||
@user.add_role :denied
|
||||
@user.set_role :denied
|
||||
@request.session[:user_id] = @user.id
|
||||
|
||||
get :index
|
||||
@@ -53,7 +53,7 @@ describe ApplicationController do
|
||||
end
|
||||
|
||||
it "redirects a pending user to a 401 and logs them out" do
|
||||
@user.add_role :pending
|
||||
@user.set_role :pending
|
||||
@request.session[:user_id] = @user.id
|
||||
|
||||
get :index
|
||||
|
||||
Reference in New Issue
Block a user