GithubHelp home page GithubHelp logo

Comments (5)

PovilasKorop avatar PovilasKorop commented on June 13, 2024

Hi @ignasbernotas - I've just tested it all again, it all works well for me. I think that Laravel version that you're using is a little older - Authorization features with permissions were added in 5.1.11:
http://laravel.com/docs/5.1/authorization
"Note: Authorization was added in Laravel 5.1.11, please refer to the upgrade guide before integrating these features into your application."

I guess we should add this requirement to our documentation.

from quickadmin.

Jeroen-G avatar Jeroen-G commented on June 13, 2024

As far as I see the error has to do with the function defined in src/Traits/AdminPermissionsTrait.php and not with a Laravel authorization function (which is can(), not permissionCan()).
It seems the function/trait is not present on the model according to the error.

from quickadmin.

ModestasV avatar ModestasV commented on June 13, 2024

I've located this bug. This is due that our middleware tries to check user data while user is not logged in. I have this bug fixed but there will be a short time till it is released (we are working on a bigger update now).

Thank you for this report and have a nice day!

from quickadmin.

ignasbernotas avatar ignasbernotas commented on June 13, 2024

One suggestion. This package shouldn't be so intrusive. By that I mean, it shouldn't overwrite the models, but rather have instructions on what traits, keys or relationships should be added to the model, or even better, there should be separate models extending the existing ones.

Thoughts? :)

from quickadmin.

PovilasKorop avatar PovilasKorop commented on June 13, 2024

Thanks for suggestion @ignasbernotas - it makes sense in general, but that's not what we're trying to build here. QuickAdmin is a GENERATOR package which people should use after fresh Laravel install. And then you can build on top of that - if you need more logic or something to be different - your models etc.
The goal here is that final result would be pure Laravel MVC code, not Quickadmin code - therefore people don't need to learn our structure or read our documentation, they generate what they need and then move on with their logic.

from quickadmin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.