Restoring permissions

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Restoring permissions

Post by Jessica »

When I test out a user's permissions, the Restore Permissions link does not appear in the header anymore.....

I have the code:

Code: Select all

					<!-- IF U_RESTORE_PERMISSIONS -->
					<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
					<!-- ENDIF -->
what am I missing? doesn't seem like I'm missing anything



EDIT: Restore Permissions link reappeared, all is good now.
Last edited by Jessica on Tue Mar 20, 2012 10:24 pm, edited 1 time in total.
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Lumpy Burgertushie
Registered User
Posts: 68471
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Restoring permissions

Post by Lumpy Burgertushie »

you probably have it placed inside another IF statement that is keeping it from showing.

I did not check all the code against the default, but I can see that you have many, many MODs installed that put IF statements in that same area.

check all of it against the default overall_header.html file and see if you wound up with it inside another IF that it shouldn't be.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: Restoring permissions

Post by Jessica »

it doesn't seem to be wound up inside another IF...

Code: Select all

				<li class="icon-ucp">
					<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
						<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
					<!-- IF FRAM_DISABLE --><!-- IF FRAM_ENABLED --> &bull; (<a href="{U_NEWFRAMS}">{L_NUM_NEWFRAMS}</a>) <!-- ENDIF --><!-- ENDIF -->
					<!-- IF S_DISPLAY_SEARCH --> &bull;

					<a href="{U_SELF_TOPICS}">{L_PRIME_SELF_TOPICS}</a> &bull;
					<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
 &bull; <a href="{U_USERS_NOTES}">{L_NOTES}</a>
					<!-- ENDIF -->
 					<!-- IF TOTAL_PENDING_MEMBERS --> &bull; <a href="{U_PENDING_LIST}">{TOTAL_PENDING_MEMBERS}</a><!-- ENDIF -->
					<!-- IF U_RESTORE_PERMISSIONS -->
					<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
					<!-- ENDIF -->
<!-- View my own profile -->
			&bull; {L_WELCOME_USER}
			<!-- ELSEIF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) -->{L_REG_GUESTS_MESSAGE}<!-- ELSEIF not (S_SHOW_COPPA or S_REGISTRATION) -->{L_NO_GUESTS_MESSAGE}<!-- ELSE -->
			<!-- ENDIF -->
			<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
<!-- End -->
				</li>
			</ul>
			<!-- ENDIF -->
here is part of it. a lot of this code is from mods.


I got the default overall_header.html...looks the same (the restore permissions part)

Code: Select all

				<li class="icon-ucp">
					<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
						<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
					<!-- IF S_DISPLAY_SEARCH --> &bull;
					<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
					<!-- ENDIF -->
					<!-- IF U_RESTORE_PERMISSIONS -->
					<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
					<!-- ENDIF -->
				</li>
			</ul>
			<!-- ENDIF -->
:
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Restoring permissions

Post by D¡cky »

Have you refreshed the template? I installed your overall_header onto a test board and "Restore Permissions" works for me. See attached image.

What happens when you go into the Administration Control Panel? You should get a message about "Permissions transferred" and have a link to "revert to your permission set."

You should check includes/functions.php and see if this line exists

Code: Select all

		'U_RESTORE_PERMISSIONS'	=> ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
If it does, then you will need to check the values of $user->data['user_perm_from'] and $auth->acl_get('a_switchperm').
Attachments
Restore permissions
Restore permissions
restore_perms.PNG (14.57 KiB) Viewed 797 times
Have you hugged someone today?
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: Restoring permissions

Post by Jessica »

D¡cky wrote:Have you refreshed the template? I installed your overall_header onto a test board and "Restore Permissions" works for me. See attached image.
no but it's appeared before...
D¡cky wrote:What happens when you go into the Administration Control Panel? You should get a message about "Permissions transferred" and have a link to "revert to your permission set."
yes I get that message. but my other admin told me that when he tested out a member's permissions (that member was a ordinary member, not a staff member), he was not supposed to see the Staff Forums, so he said that the permissions weren't transferred...however the message still appears in the ACP...I don't think I get the link but I'll double check
D¡cky wrote:You should check includes/functions.php and see if this line exists

Code: Select all

		'U_RESTORE_PERMISSIONS'	=> ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
If it does, then you will need to check the values of $user->data['user_perm_from'] and $auth->acl_get('a_switchperm').
yep that line exists. but what do you mean check the values?
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Restoring permissions

Post by D¡cky »

Jessica wrote:
D¡cky wrote:Have you refreshed the template? I installed your overall_header onto a test board and "Restore Permissions" works for me. See attached image.
no but it's appeared before...
Then you ought to refresh the template first.
Jessica wrote:
D¡cky wrote:You should check includes/functions.php and see if this line exists

Code: Select all

		'U_RESTORE_PERMISSIONS'	=> ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
If it does, then you will need to check the values of $user->data['user_perm_from'] and $auth->acl_get('a_switchperm').
yep that line exists. but what do you mean check the values?
OPEN includes/functions.php
FIND

Code: Select all

	// The following assigns all _common_ variables that may be used at any point in a template.
	$template->assign_vars(array(
BEFORE, ADD

Code: Select all

echo 'user_perms = ' . $user->data['user_perm_from'] . '<br >';
echo 'restore_perms = ' . $auth->acl_get('a_switchperm') . '<br />';
SAVE/CLOSE
Go to the index page of your board. The values will be output at the top of the page.
The user_perms should be the id of the member you transferred the permissions from. The restore_perms value should be 1.
Have you hugged someone today?
Thanks in advance
Registered User
Posts: 173
Joined: Mon Dec 28, 2009 8:17 am

Re: Restoring permissions

Post by Thanks in advance »

I get these values when trying to test out user’s permissions (which doesn't work):
user_perms = 0
restore_perms = 1
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Restoring permissions

Post by Oyabun1 »

Thanks in advance wrote:I get these values when trying to test out user’s permissions (which doesn't work):
Please fill out the Support Request Template and post it back here to enable us to assist you better. Also, detail exactly what you did to test out permssions and "doesn't work" means.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
Thanks in advance
Registered User
Posts: 173
Joined: Mon Dec 28, 2009 8:17 am

Re: Restoring permissions

Post by Thanks in advance »

Support Request Template
What version of phpBB are you using? phpBB 3.0.10
What is your board's URL? n/a (problem can just be reproduced with an admin account)
Who do you host your board with? HostEurope
How did you install your board? I used the download package from phpBB.de
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
What version of phpBB3 did you update from? phpBB 3.0.9
What styles do you currently have installed? prosilver / subsilver2
What language(s) is your board currently using? German (de)
Which database type/version are you using? MySQL 5
What is your level of experience? New to PHP but not phpBB
What username can be used to view this issue? n/a (admin account neccessary to reproduce)
What password can be used to view this issue? n/a
When did your problem begin? Since the automatic upgrade from phpBB 3.0.9
Please describe your problem. After clicking on the "Test out users permissions" link in user profiles or the ACP I do get the message "Successfully transferred permissions from *username*, you are now able to browse the board with this user's permissions.", BUT when I look at the index page I still see all forums admins can see, normal users (whose permissions I am testing) definitely not.
Generated by SRT Generator
D¡cky wrote:SAVE/CLOSE
Go to the index page of your board. The values will be output at the top of the page.
The user_perms should be the id of the member you transferred the permissions from. The restore_perms value should be 1.
restore_perms = 1 [correct]
user_perms = 0 [wrong, always zero instead of the member ID in my case]
Thanks in advance
Registered User
Posts: 173
Joined: Mon Dec 28, 2009 8:17 am

Re: Restoring permissions

Post by Thanks in advance »

No ideas how I could resolve the problem?
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Restoring permissions

Post by Oyabun1 »

Since you have no MODs and the problem may have been caused by an incorrect change merger in you update replace all the files.

Before proceeding backup all files and the database.
  • Download the full version.
  • Unzip to your desktop and open the phpBB3 folder.
  • Remove (delete) the config.php file, and the images and files folders from the package.
  • Via FTP upload the remaining files and folders to the root of your board installation on the server overwriting the existing files.
  • In your browser go to http://www.yourdomain/yourforum/install ... update.php
  • Let that run to completion. (Shouldn't be necessary, but just in case.)
  • Via FTP delete the install folder from the root of your board installation.
  • Via FTP open the cache folder and delete everything EXCEPT, index.htm and .htaccess (if you can see that).
  • Done.
Only use a good FTP client, such as FileZilla, to transfer the files. (File transfer utilities provided in host control panels can cause problems.)
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
Locked

Return to “[3.0.x] Support Forum”