I installed and used the Yii Webshell extension (link) without problems in a project I am working on. I then installed Yii Rights (link), configured it and have it working fine for all my controllers/views. I have now come back to needing to use Webshell for testing console commands on a shared host where I have no SSH access but I cannot access it.
I get a 403 error stating that access is denied which is fine as I don’t want anybody but myself to access it but I cannot find anywhere in the documentation where I can allow a module (i.e. webshell) for a particular user.
The Webshell module does appear in the “Rights Generate Items” but has no child items to generate for. I have tried manually setting up a permission for “Webshell” but this hasn’t worked either.
First of all check if you allowed your ip to use webshell module, using ipFilter property.
If you want to allow access only to a specific user, do the following:
Create a new operation, named Webshell.Default.* with the Business rule return Yii::app()->user->getId() == 1; (replace 1 with the id of the user you want to allow access)
In the Permissions tab assign access to a role that the user has (assign to Guest for example, as the other roles inherit from it)
If you don’t need to be specific about the user id allowed to access the controller, simply remove the Business Rule.
Thank you for your response. I have done what you said but I still get the 403 error page.
I have no ipFilter setup, I created the new operation as suggested (with business rule as: return Yii::app()->user->getId() == 1;) and assigned it to my ‘authenticated’ role. My user ID is 1 so the business rule does evaluate to true)… This didn’t work so I tried assigning it to the ‘guest’ role as well but still no no avail.