mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-25 02:10:39 +00:00
- authentication fix
- demo helper
This commit is contained in:
@@ -51,7 +51,7 @@ class PagesController extends Controller
|
||||
*/
|
||||
public function update(Request $request, Page $page)
|
||||
{
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
return $this->demo->response_with_no_content();
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class PlanController extends Controller
|
||||
public function store(Request $request)
|
||||
{
|
||||
// TODO: inline request
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
|
||||
if (Cache::has('plan-starter-pack')) {
|
||||
$plan = Cache::get('plan-starter-pack');
|
||||
@@ -110,7 +110,7 @@ class PlanController extends Controller
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
return $this->demo->response_with_no_content();
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ class PlanController extends Controller
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
return $this->demo->response_with_no_content();
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class SettingController extends Controller
|
||||
*/
|
||||
public function update(Request $request)
|
||||
{
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
return $this->demo->response_with_no_content();
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class SettingController extends Controller
|
||||
public function set_email(Request $request)
|
||||
{
|
||||
// TODO: pridat validator do requestu
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
return $this->demo->response_with_no_content();
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class SettingController extends Controller
|
||||
*/
|
||||
public function flush_cache()
|
||||
{
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
return $this->demo->response_with_no_content();
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class UserController extends Controller
|
||||
public function change_role(ChangeRoleRequest $request, User $user)
|
||||
{
|
||||
// Demo preview
|
||||
if (env('APP_DEMO') && $user->email === 'howdy@hi5ve.digial') {
|
||||
if (is_demo_account('howdy@hi5ve.digial')) {
|
||||
return new UserResource($user);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ class UserController extends Controller
|
||||
public function reset_password(User $user)
|
||||
{
|
||||
// Demo preview
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ class UserController extends Controller
|
||||
*/
|
||||
public function delete_user(DeleteUserRequest $request, User $user)
|
||||
{
|
||||
if (env('APP_DEMO')) {
|
||||
if (is_demo()) {
|
||||
return response('Done!', 204);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user