Giter VIP home page Giter VIP logo

kirby-bouncer's People

Contributors

bnomei avatar dependabot[bot] avatar hlp-pls avatar kerli81 avatar sylvainjule avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kirby-bouncer's Issues

Questions about Bouncer plugin and Permissions

Hello,

We’re attempting to use the Bouncer plugin because we'd like users to only have access to certain content pages, but we also want some of them to be able to edit users.

Is that possible with this plugin?

screenshot of bouncer settings from site/blueprints/users/staff.yml
Screenshot 2023-11-21 at 11 16 17 AM

Incompatible with 3.6.0

Hi Sylvain,

As you can see from he alpha version of 3.6.0 (https://getkirby.com/releases/3.6), we will remove vue-router with this release. Which of course means that your plugin's functionality would be rendered broken.

However, in anticipation we added two hooks

I would believe that with the panel.route:before hook, we could recreate your plugin. Likely even much simpler than the current setup. Let me know your thoughts - happy to collaborate.

Feature request: limit search results

Thanks for this very helpful plugin. Maybe this would be an interesting addition for your own needs too.

At the moment the panel seach function is showing all matching results, even in pages that are not visible to the current user. Of course they still can’t be accessed, but it would be nicer of they would not be visible in the first place. Not sure how hard this is to achieve.

"Basculer vers"

hello and thank you for the plugin. i am upgrading a project to kirby 4.2 installation and the newest realease of the plugin. somehow now it is hard coded in the JS 'Basculer vers'. in the previous version it said "Switch:". can you pelase look into this?

Selected pages are not showing up

My setup:

  • content

    • 1_class1
      • 1_student-a
        • student.txt
      • 2_student-b
        • student.txt
  • site

    • blueprints
      • users
        • student.yml

This is the student.yml file:

title: Student

permissions:
  access:
    panel: true
    site: true
    settings: false
    languages: false
    users: false
  # ...
  user:
    changeRole: false
    delete: false
    update: false # else a user will be able to edit the page they have access to on their profile

fields:
  canaccess:
    label: "The user will only be able to access:"
    type: pages
    options: query
    query: site.pages

Unfortunately it shows No pages selected yet in the pages view. I tried multiple query methods, but it never worked for me.
How can I add pages to the query?

Bouncer and Draft Status

I've set up bouncer and all is good (thanks) except users with their access controlled by bouncer can not nav to pages that they been given access to if those pages are draft. Is this expected? And if so is there a way around it?

Better fields list declaration

Hello,
first of all, thank you for this plugin!

I think that the way as the field are declared may can be improved.

An example can be:

'sylvainjule.bouncer.list' => [
    'author' => [
        'fieldname' => 'access',
        'nav' => true
    ],
    'blog-editor' => [
        'fieldname' => 'access',
        'nav' => true
    ],
    'contributor' => [
        'fieldname' => 'access',
        'nav' => true
    ],
    'moderator' => [
        'fieldname' => 'access',
        'nav' => true
    ],
    'examplerole' => [
        'fieldname' => 'onlyAccess',
    ],
],

A more reusable way can be by adding the fields as keys and the roles inside as array|string.

Something like this:

'sylvainjule.bouncer.list' => [
    'access' => [
        'roles' => ['author', 'blog-editor', 'contributor', 'moderator'],
        'nav' => true
    ],
    'onlyAccess' => [
        'roles' => 'exampleRole',
    ],
]

Is only a suggestion 🙂

EDIT: The disadvantage is when you want the same field name with different options as the nav value.

Infinit reload on kirby installation caused by kirby-bouncer

When this plugin is installed and there is no account created, the panel login page reload for ever.

When I remove kirby-bouncer plugin, i can install kirby and create the first account.

Error message in the console
Object { status: "error", message: "Unauthenticated", code: 403, exception: "Kirby\\Exception\\PermissionException", key: "error.permission", file: "authentication.php", line: 23, details: [], route: "current-user" }

Problems accessing subpages and options

Hi, and thank you for a great plugin!

I’m having some problems accessing subpages after updating to 1.0.4. There are also problems with the options; for example, I get “The dropdown is empty” when trying to click on “...” in cards or access the settings menu.

I verified the error with a clean install of the starter kit.

add comment to config snippet

i copied the snippet but decided to change the blueprint name and forgot about the config value since everything else seemed to work. a small comment (not just the information in the sentence above the snippet) could help spot this mistake later on.

return [
    'sylvainjule.bouncer.list' => [
        'test' => [ // match the filename without extension of the user blueprint
            'fieldname' => 'canaccess'
        ]
    ]
];

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.