Comments (16)
Do you mean that a menu item is not shown although the user is allowed to see it?
from builder-plugin.
Yes! User is allowed not see.
from builder-plugin.
I can't replicate the problem. Please make sure that you use latest version of the Builder and core. Submit steps for replicating the problem. If you can - please create a new plugin and attach it as a ZIP file here.
from builder-plugin.
Ok, I uploaded google driver
https://drive.google.com/folderview?id=0B3lfds0CCdr7OFZFLWk4aUVxcVk&usp=sharing
from builder-plugin.
@alekseybobkov, Can you look problem?
from builder-plugin.
I can't confirm the problem. I can see the menu item under the administrator user account and it's expected. When I sign in as another user, I don't see the menu item because the user doesn't have the corresponding permission.
from builder-plugin.
I too have a similar problem; hopefully this adds positively to the conversation. With Builder I first create permissions. Then I have set the permissions for backend menus to my controllers in the plugin.
Example, define the permission:
Then use it for menu:
(the companyname is deliberately crossed)
When a user now gets the permission to '..test.access_test' the menu is NOT shown! When I remove the permission from the menu or when I make the user a superuser; the menu is shown again.
Do I perhaps forget a step or something?
from builder-plugin.
I still can't reproduce it. That's how I test:
- Install a test plugin from #51 (comment) (I had to remove updates to not pollute my database).
- Go to Settings / Administrators.
- Assign "Allow" value to Other Brands / Manage Orders permission for a test administrator.
- Log in as the test administrator.
- Make sure that I see the Manage Orders menu item.
If I change "Allow" to "Deny" I don't see the menu item.
from builder-plugin.
Thank you for your response!
I will try the same test plugin as you did, with the same steps and report back.
What do you mean with: "I had to remove updates to not pollute my database". What updates exactly, or does this not concern anyone else you think?
from builder-plugin.
Perhaps you mean this:
Rolled back: Daovm.OrderBrand
Reinstalling plugin...
PHP Fatal error: Cannot declare class Daovm\OrderBrand\Updates\BuilderTableUpdateDaovmOrderbrandOrder4, because the nam
e is already in use in /home/vagrant/Code/ubpweb2/plugins/daovm/orderbrand/updates/builder_table_update_daovm_orderbrand
_order_4.php on line 17
I did a little renaming so that the updates runs just fine.
from builder-plugin.
My test fails unfortunately. The results (if you miss something, please just ask):
This will test the permissions of another administrator then the account I am logged in; for "Manager Orders" are allowed and denied, to see if the menu items appear.
The account belongs to the "Owners" group, the permission for "Manager Orders" in the group is not selected.
Now to test the appearance of the menu item, I log into the backend with this other administrator account: the menu item is NOT shown:
The menu item is shown correctly:
from builder-plugin.
Could this perhaps be a caching / cookie problem..?
from builder-plugin.
Some more testing data: I have tested if the controller/action is available for the logged in non-super-user, by going to that url (backend/daovm/orderbrand/orders):
Permission 'daovm.orderbrand.manager_order' for user:
- denied: access is denied (as intended!)
- allowed: access is allowed and the page is shown (as intended!)
The only thing that is not correctly working is showing the menu items, accordingly to the permissions set.
from builder-plugin.
Deeper into the code of October we dive...
Dump in \Backend\Classes\NavigationManager registerMenuItems()
of $owner and $definitions:
"Daovm.OrderBrand"
array:1 [▼
"manager_orders" => array:5 [▼
"label" => "Manager Orders"
"url" => "http://localhost/backend/daovm/orderbrand/orders"
"icon" => "icon-bookmark"
"permissions" => array:1 [▼
0 => "http://localhost/backend/daovm.orderbrand.manager_order"
]
"sideMenu" => array:1 [▼
"orders" => array:4 [▼
"label" => "Orders"
"url" => "http://localhost/backend/daovm/orderbrand/orders"
"icon" => "icon-ticket"
"permissions" => array:1 [▼
0 => "http://localhost/backend/daovm.orderbrand.manager_order"
]
]
]
]
]
"October.Backend"
array:1 [▼
"dashboard" => array:5 [▼
"label" => "backend::lang.dashboard.menu_label"
"icon" => "icon-dashboard"
"url" => "http://localhost/backend/backend"
"permissions" => array:1 [▼
0 => "backend.access_dashboard"
]
"order" => 1
]
]
The "permissions" are way different. Is this maybe a problem?
from builder-plugin.
@ametad, please make sure that you're running the latest build of October. There was an issue #30, which is already fixed, where URLs were applied to permissions.
from builder-plugin.
Thank you for pointing that out. Once updated correctly the problem is gone! Permissions and the showing/hiding of menu's works correctly.
from builder-plugin.
Related Issues (20)
- plugin won't update from 1.0.26 to 1.0.28 HOT 2
- Error when saving plugin with File field HOT 3
- move plugin HOT 1
- Adding form fields to model does not load the .env DB connection variables HOT 1
- Version rollback not working in PHP 8 HOT 1
- Feature request: Migrations for update columns HOT 1
- Display A Single Column Record In the Page Title HOT 1
- BackendMenu issue with duplication of permission HOT 1
- Custom value in Relation HOT 1
- How to add comment for field via UI of Database? HOT 3
- Database - Version 1.2.1 HOT 2
- BadMethodCallException: Method October\Rain\Validation\Validator::validateReserved does not exist HOT 1
- Error when creating a new plugin in the newest update [version: 3.1.22] HOT 2
- Builder Plugins Not Showing Up In Plugin Selector List HOT 2
- Repeater maxItems HOT 2
- Call to undefined method RainLab\Builder\Models\ControllerModel::processImportExportConfig() HOT 1
- Unable to find configuration file - Error in October CMS 3.4.6 install HOT 5
- Builder Plugin Reorder is missing HOT 3
- Importing a Tailor Model with `multisite: sync` throws Exception HOT 1
- New plugins not showing in plugins list HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from builder-plugin.