You are not authorised!

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Anti-Spam Guide
Locked
User avatar
Gideon5L2F
Registered User
Posts: 242
Joined: Thu Oct 09, 2003 6:33 pm
Location: New Zealand
Contact:

You are not authorised!

Post by Gideon5L2F »

User roles allow us to select an option that denies a person viewing the memberlist or profile. We have a group that is denied that privilege.

However, I do not want to rub it in their face. When they click the ‘profile’ button they are presented with a rude message, “You are not authorised to view the memberlist or profile.” Sort of makes them feel like second class citizens - which is probably true but I don’t exactly want to say so. (lol) :oops:

So ... Would some kind developer consider removing the ‘Profile’ button instead? Same end result of course, but without slapping them in the face with a wet fish.

Just a thought.

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69559
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: You are not authorised!

Post by KevC »

Alternatively, open language/en/memberlist.php in notepad++ and find this line

Code: Select all

	'NO_VIEW_USERS'			=> 'You are not authorised to view the member list or profiles.',
Edit the text on the right to say something you think more appropriate.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
Gideon5L2F
Registered User
Posts: 242
Joined: Thu Oct 09, 2003 6:33 pm
Location: New Zealand
Contact:

Re: You are not authorised!

Post by Gideon5L2F »

Thanks Kevin, Ill do that. :)

However, I would like to leave it as a suggestion that the 'profile' icon be hidden in the same way as the 'members' link is made invisible when this option is used.

User avatar
Dragonwolf
Registered User
Posts: 603
Joined: Mon Aug 20, 2007 7:46 pm

Re: You are not authorised!

Post by Dragonwolf »

I was working on a couple of simple changes to the way the forum says things to make it more friendly, but unfortunatly it doesn't really count as a mod.

User avatar
Gideon5L2F
Registered User
Posts: 242
Joined: Thu Oct 09, 2003 6:33 pm
Location: New Zealand
Contact:

Re: You are not authorised!

Post by Gideon5L2F »

I believe this is a bug and not merely a feature request. Here is why:
  1. When the option is turned off, names are greyed out on the index page. This is to prevent people clicking on them.
  2. When the option is turned off, the memberlist is made invisible. This is proper and consistent with point #1.
However, when reading a topic, individual profile button remain clickable. This is a bug because it is inconsistent with the other methods. (They should all be invisible)

Gideon

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51912
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: You are not authorised!

Post by Brf »

In viewtopic.php, find:

Code: Select all

				'profile'		=> append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"),
replace with:

Code: Select all

				'profile'		=> ($auth->acl_get('u_viewprofile')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id") : '',

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Re: You are not authorised!

Post by Acyd Burn »

Is this fix also hiding the profile icon? :)

Bug report related: http://www.phpbb.com/bugs/phpbb3/37635

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51912
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: You are not authorised!

Post by Brf »

Yes. That is the pupose of this mod -- to hide the profile button when the user is not authorized to see them.

Further on down the page, it goes into this:

Code: Select all

	'U_PROFILE'		=> $user_cache[$poster_id]['profile'],
leaving U_PROFILE blank.

Then in subsilver2's viewtopic_body:

Code: Select all

<!-- IF postrow.U_PROFILE --><a href="{postrow.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> 
will hide the button.

User avatar
Gideon5L2F
Registered User
Posts: 242
Joined: Thu Oct 09, 2003 6:33 pm
Location: New Zealand
Contact:

Re: You are not authorised!

Post by Gideon5L2F »

Ive just noticed we have the same issue with 'Can send Emails' in User Roles. If disallowed, the link is still provided. If you click it, a message appears, "You are not permitted to send e-mail to this user."

May I suggest that it would be better if the link was simply taken away? :idea:

Gideon

User avatar
leviatan21
Registered User
Posts: 2663
Joined: Fri Aug 10, 2007 7:22 am
Location: Buenos Aires, Argentina
Name: Gabriel

Re: You are not authorised!

Post by leviatan21 »

Brf wrote:In viewtopic.php, find:

Code: Select all

				'profile'		=> append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"),
replace with:

Code: Select all

				'profile'		=> ($auth->acl_get('u_viewprofile')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id") : '',
You don't need to do that :

in viewtopic.php
we have this :

Code: Select all

		'U_POST_AUTHOR'			=> get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
the function get_username_string() already check if the user have permission to view profiles

From functions_content.php :

Code: Select all

			// Build correct profile url - only show if not anonymous and permission to view profile if registered user
			// For anonymous the link leads to a login page.
			if ($user_id && $user_id != ANONYMOUS && ($user->data['user_id'] == ANONYMOUS || $auth->acl_get('u_viewprofile')))
			{
				$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);
			}
			else
			{
				$profile_url = '';
			}
And this works in prosilver, but in subsilver2 instead use postrow.U_POST_AUTHOR is used postrow.U_PROFILE

I think we can delete U_PROFILE from viewtopic.php and replace the subsilver2 8-)
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español

Locked

Return to “[3.0.x] MOD Requests”