sylvainjule / kirby-bouncer Goto Github PK
View Code? Open in Web Editor NEWRestrict access of a user role to a specific page (and its children) in the panel.
License: MIT License
Restrict access of a user role to a specific page (and its children) in the panel.
License: MIT License
It seems like the password reset feature, accessible via the panel/reset-password
URL, is not working for non-admin users when the bouncer plugin is activated. I just tried this with a clean install of the Starterkit + the plugin.
https://getkirby.com/docs/guide/authentication/password-reset-form
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.
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.
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?
My setup:
content
site
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?
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?
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.
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" }
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.
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'
]
]
];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.