This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

vcvioo
vcvioo

For the UI, I tried to use removeField() to hide the button after checking role/permission, but I have no idea about the field name is. On the other direction, hard code the update.htm is working, but I don't want to modify plugin file.

For the functionality , I want to check role/permission before run the UsersController update_onDelete(). Can we override the original controller method??

Last updated

mjauvin
mjauvin

you can override the plugin partials in your theme.

ref. https://octobercms.com/docs/cms/components#overriding-partials

mjauvin
mjauvin

You can't dynamically override a method. The only way is to extend the controller and override this method, but then you'd have to use YOUR controller by hiding the default plugin's controller menu and installing yours...

vcvioo
vcvioo

mjauvin said:

You can't dynamically override a method. The only way is to extend the controller and override this method, but then you'd have to use YOUR controller by hiding the default plugin's controller menu and installing yours...

Thanks! It fits my need and works like a champ.

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.