How to reset permissions and access levels?

Moderators: mandville, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
veritaly
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jun 02, 2011 8:43 am

How to reset permissions and access levels?

Post by veritaly » Mon Mar 30, 2015 2:36 pm

Some previous topics are similar to my issue:
  • My Administrator page doesn't show the main and sub menus, so no way to access the normal backend, I only see 'popular articles', 'logged in users', 'messages'
  • I did create new levels and groups, but not touched my Super User level and access.
  • I did give new permissions to the new groups, I was trying to hide some of the admin menus for the new groups
  • I probably messed up the ACL, how can I reset it on the Database with PhpMyAdmin?
It is Joomla 3.4.1 with no other external extensions but Sobipro

thank you

User avatar
NathanHawks
Joomla! Ace
Joomla! Ace
Posts: 1900
Joined: Wed Oct 02, 2013 6:17 pm
Location: Washington state, U.S.
Contact:

Re: How to reset permissions and access levels?

Post by NathanHawks » Tue Mar 31, 2015 8:37 pm

I suggest taking a full backup of your database first, via phpMyAdmin's Export tool. Be sure to get both Structure and Data (default settings usually work; just be sure you are looking at a list of tables when you click Export). Save the file for safekeeping.

The below will not affect what group/list has access to what sections of your site, or who is a member of which groups -- it only resets the actual Viewlevels and Groups themselves to default. It doesn't sound like your site could get much more broken, but in all actuality, it could -- so be darn sure you have a good database backup!

Next you need to make note of the table prefixes you are using. This is the (hopefully random) sequence of characters at the beginning of every table name.

Next, truncate the *_usergroups table (meaning drop all its rows but leave the table itself intact).

Next, run this in your SQL window -- be sure to replace "YOURPREFIX" with your table prefix.

Code: Select all

INSERT INTO `YOURPREFIX_usergroups` (`id`, `parent_id`, `lft`, `rgt`, `title`) VALUES
(1, 0, 1, 18, 'Public'),
(2, 1, 8, 15, 'Registered'),
(3, 2, 9, 14, 'Author'),
(4, 3, 10, 13, 'Editor'),
(5, 4, 11, 12, 'Publisher'),
(6, 1, 4, 7, 'Manager'),
(7, 6, 5, 6, 'Administrator'),
(8, 1, 16, 17, 'Super Users'),
(9, 1, 2, 3, 'Guest');
Now truncate YOURPREFIX_viewlevels. Then replace YOURPREFIX below with your prefix, and paste into the SQL tool again:

Code: Select all


INSERT INTO `YOURPREFIX_viewlevels` (`id`, `title`, `ordering`, `rules`) VALUES
(1, 'Public', 0, '[1]'),
(2, 'Registered', 1, '[6,2,8]'),
(3, 'Special', 2, '[6,3,8]'),
(5, 'Guest', 0, '[9]'),
(6, 'Super Users', 0, '[8]');
Be careful and you'll be fine.
Save time - hire me for your Joomla to-do list! http://nathanhawks.us/joomla

User avatar
idscomm
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Tue Jan 15, 2013 5:33 am
Location: Nova Scotia, Canada
Contact:

Re: How to reset permissions and access levels?

Post by idscomm » Tue Sep 13, 2016 4:46 pm

Awesome post! Thanks, you save me today!!! :D
http://www.idscomm.ca

Did you know, I little bit of knowledge can save your life compare to a little bit of stupidity which can kill you!


Locked

Return to “Access Control List (ACL) in Joomla! 3.x”