Remove auth from uploads, auth config
This commit is contained in:
@@ -2,15 +2,11 @@ module Adamantium
|
|||||||
module Actions
|
module Actions
|
||||||
module Media
|
module Media
|
||||||
class Create < Action
|
class Create < Action
|
||||||
before :authenticate!
|
|
||||||
|
|
||||||
include Deps["commands.media.upload"]
|
include Deps["commands.media.upload"]
|
||||||
|
|
||||||
def handle(req, res)
|
def handle(req, res)
|
||||||
data = req.params[:file]
|
data = req.params[:file]
|
||||||
|
|
||||||
halt 401 if verify_scope(req: req, scope: :media)
|
|
||||||
|
|
||||||
upload.call(file: data) do |m|
|
upload.call(file: data) do |m|
|
||||||
m.failure do |v|
|
m.failure do |v|
|
||||||
res.status = 422
|
res.status = 422
|
||||||
|
@@ -3,6 +3,7 @@ module Adamantium
|
|||||||
module Site
|
module Site
|
||||||
class Config < Action
|
class Config < Action
|
||||||
include Deps["settings", "views.site.home"]
|
include Deps["settings", "views.site.home"]
|
||||||
|
before :authenticate!
|
||||||
|
|
||||||
def handle(req, res)
|
def handle(req, res)
|
||||||
if req.params[:q] == "config"
|
if req.params[:q] == "config"
|
||||||
|
Reference in New Issue
Block a user