21288 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1117 Views |
-
Admin Permissions

17 August 2009 at 11:57pm
Hi all,
Hate to use the term, but absolute noob here that has made a very rookie mistake with my site permissions.
I was adding a new user to the site with restricted permissions. That worked, but I've also managed to duplicate the admin permissions to the same settings - now I can't change the site myself.
I've had a bit of a look around the forums, but really appreciate some help if anyone knows how to reset the admin settings if I can't access the administrators/users section of the backend.
-
Re: Admin Permissions

18 August 2009 at 2:01am Last edited: 18 August 2009 2:02am
Hi chrisco_7,
Don't worry, we all have made this mistake somewhere (or a similar one at least).
In your /mysite/_config.php:
Security::setDefaultAdmin($username, $password)
And that should allow you to login as an administrator with full privileges. If not... well, then you're a bit buggered, I fear!
See: http://doc.silverstripe.com/doku.php?id=security#system_configuration
-
Re: Admin Permissions

18 August 2009 at 11:10pm
Thanks Pigeon.
I gave that a shot but kept getting "Notice: Undefined variable: username in C:\wamp\www\SilverStripe-v2.3.2\mysite\_config.php on line 30" (line 30 or anywhere else I place it) when testing if it worked. The massage appeared instead of the control panel along the top of the backend display, replacing the buttons with this message repeated.
Please forgive the ignorance, but should it be as simple as copying and pasting that code (with no changes) inside that config.php file? I've had a read and it doesn't state where to drop the line of code, or if it needs anything extra added and I just keep getting the error regardless of where I place it.
Would really appreciate some words of wisdom with getting this train back on track...
-
Re: Admin Permissions

18 August 2009 at 11:42pm
No worries,
$username and $password should be replaced with strings, such as "test" and "test" (respectively). Then you would log in with those credentials.
Sorry for the ambiguity.
-
Re: Admin Permissions

19 August 2009 at 1:20am
Ha haaaaa,
Worked like a charm. You're a legend Pigeon!
| 1117 Views | ||
|
Page:
1
|
Go to Top |


