Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Allow admins to list all when auth_view_own=1

Quote Reply
Allow admins to list all when auth_view_own=1
I set auth_view_own to 1 and now the admins can also only view their own records. Is there a way to allow admins to view all while still only allowing registered members to view own?
Thanks,

David
Quote Reply
Re: [davidbessler] Allow admins to list all when auth_view_own=1 In reply to
Hi,

You need to customize Home.pm a little bit. Please do as below:
- Find these lines in sub-routine search_results :
Code:
# Check if users can view only their own record
if ($self->{cfg}->{'auth_view_own'} and $self->{cfg}->{'auth_user_field'} ) {
- Replace with :
Code:
# Check if users can view only their own record
if ($self->{cfg}->{'auth_view_own'} and $self->{cfg}->{'auth_user_field'} and !$self->{user}->{admin_p}) {

Cheers,
jean@gossamer-threads.com

Last edited by:

jean: Jan 16, 2002, 11:58 AM
Quote Reply
Re: [jean] Allow admins to list all when auth_view_own=1 In reply to
You are a lifesaver. Thanks.
Thanks,

David