mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 05:34:04 +00:00
Merge pull request #942 from nishanthvijayan/fix-roles-authorization
Fix authorization issues with Roles
This commit is contained in:
commit
0a5ba7a204
6 changed files with 77 additions and 51 deletions
|
|
@ -2,11 +2,13 @@ module Admin
|
|||
class RolesController < Admin::BaseController
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
before_action :set_selection
|
||||
authorize_resource :role, except: :index
|
||||
# Show flash message with ajax calls
|
||||
after_action :prepare_unobtrusive_flash, only: :toggle_user
|
||||
|
||||
def index
|
||||
@roles = Role.where(resource: @conference)
|
||||
authorize! :index, @role
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue