Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropzone uploading in demo - generalize the denial #527

Open
tabacitu opened this issue Jun 28, 2023 · 0 comments
Open

Dropzone uploading in demo - generalize the denial #527

tabacitu opened this issue Jun 28, 2023 · 0 comments

Comments

@tabacitu
Copy link
Member

tabacitu commented Jun 28, 2023

We talked about making the Dropzone operation not work... in a more general way. So that people using the Demo in production don't have access to upload stuff. Pedro came up with this - sounds good to me!

<?php

namespace App\Http\Controllers\Operations;

if (! env('APP_ENV') === 'production') {
    trait DropzoneOperation
    {
        public function dropzoneUpload()
        {
            return response()->json([]);
        }
    }
} else {
    trait DropzoneOperation
    {
        use \Backpack\Pro\Http\Controllers\Operations\DropzoneOperation;
    }
}

And then in demo we use App\Http\Controllers\Operations\DropzoneOperation instead of the one in the package ?

If you agree I can push this change.

Cheers

Originally posted by @pxpm in #456 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants