mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-25 12:01:03 +00:00
Fixing path to administrate view and added permission checks to controller
This commit is contained in:
parent
29d447e97b
commit
0f0393ecc5
3 changed files with 5 additions and 1 deletions
|
@ -1,9 +1,10 @@
|
|||
class CustomUrlsController < ApplicationController
|
||||
def administrate
|
||||
raise AccessError unless cuser && cuser.admin?
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
raise AccessError unless request.xhr?
|
||||
end
|
||||
|
||||
def show
|
||||
|
@ -15,8 +16,10 @@ class CustomUrlsController < ApplicationController
|
|||
end
|
||||
|
||||
def update
|
||||
raise AccessError unless request.xhr?
|
||||
end
|
||||
|
||||
def destroy
|
||||
raise AccessError unless request.xhr?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,5 +18,6 @@
|
|||
<li><%= link_to "Contests", contests_path %></li>
|
||||
<li><%= link_to "Challenges", challenges_path %></li>
|
||||
<li><%= link_to "Maps", maps_path %></li>
|
||||
<li><%= link_to "Custom Article URLs", custom_urls_path %></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue