示例#1
0
 public function __construct()
 {
     parent::__construct();
     if (!user('object')->can('manage_contents')) {
         $this->middleware('deny403');
     }
 }
示例#2
0
 public function __construct(ContentRepository $content)
 {
     parent::__construct();
     $this->content = $content;
     if (!user('object')->can('manage_contents')) {
         $this->middleware('deny403');
     }
 }
 public function __construct(SystemOptionRepository $option)
 {
     parent::__construct();
     $this->option = $option;
     if (!user('object')->can('manage_system')) {
         $this->middleware('deny403');
     }
 }
示例#4
0
 public function __construct(SettingRepository $setting)
 {
     parent::__construct();
     $this->setting = $setting;
     if (!user('object')->can('manage_system')) {
         $this->middleware('deny403');
     }
 }
 public function __construct(SystemLogRepository $log)
 {
     parent::__construct();
     $this->log = $log;
     if (!user('object')->can('manage_system')) {
         $this->middleware('deny403');
     }
 }
 public function __construct(MetaRepository $meta)
 {
     parent::__construct();
     $this->meta = $meta;
     if (!user('object')->can('manage_contents')) {
         $this->middleware('deny403');
     }
 }
 public function __construct(RoleRepository $role)
 {
     parent::__construct();
     $this->role = $role;
     if (!user('object')->can('manage_users')) {
         $this->middleware('deny403');
     }
 }
示例#8
0
 public function __construct(UserRepository $user)
 {
     parent::__construct();
     $this->user = $user;
     if (!user('object')->can('manage_users')) {
         $this->middleware('deny403');
     }
 }
示例#9
0
 public function __construct(ContentRepository $content, FlagRepository $flag)
 {
     parent::__construct();
     $this->content = $content;
     $this->flag = $flag;
     if (!user('object')->can('manage_contents')) {
         $this->middleware('deny403');
     }
     if (!Cache::has('flags')) {
         //如果推荐位缓存不存在
         DataCache::cacheFlags();
     }
     $this->flags = Cache::get('flags');
 }
示例#10
0
 public function __construct(MeRepository $me)
 {
     parent::__construct();
     $this->me = $me;
 }