Closed tobystokes closed 8 years ago
The option c::set('autogit.widget', false)
can be used to achieve that. You don't even need to hack Auto Git's code, add that logic inside site/config/config.php
:
// ...
if (! panel()->user()->isAdmin()) {
c::set('autogit.widget', false);
}
// ...
Since developer can create new roles and permissions, I preferred to leave it up to them to show or hide the widget as they needed.
Let me know if this option works for your needs 😉
Of course. That works. :thumbsup:
A small enhancement - rather than set widget on or off globally, it would be great if it could be shown to select user roles (I don't want my editors pulling and pushing!)
I have hacked a
if(panel()->user()->isAdmin()) { ...
around the widget for my purposes, but it would nicer if it could be specified in the config as something likec::set('autogit.widget', 'admin,other_allowed_group');