I was having the same problem as described by Nielsp. Using following setup as suggested by TheStone, the default user URl does not show any records.
The Authorization Options should be set:
auth_no_authentication: No
auth_allow_default: view
auth_modify_own: Yes
auth_user_field: This is the field name in the database used for storing the userid who owns the record.
The URL of default user to view all records:
db.cgi?db=table_name&do=search_results&keyword=*&uid=default
TheStone.
Gossamer Threads Inc.
It seems that the reason might be the code in Home.pm in Sub search_results. I changed the following 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} ) {
$self->{cgi}->{$self->{cfg}->{'auth_user_field'}} = $self->{user}->{'Username'};
$self->{cgi}->{"$self->{cfg}->{'auth_user_field'}-opt"} = '=';
}
=========
to
=========
# 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} ) {
# if Statement introduced to enable displaying of records for default user, and not put the condition
if ( $self->{user}->{'Username'} ne 'default' ) {
$self->{cgi}->{$self->{cfg}->{'auth_user_field'}} = $self->{user}->{'Username'};
$self->{cgi}->{"$self->{cfg}->{'auth_user_field'}-opt"} = '=';
}
}
=========
It seems to work now. I am not certain if this is a correct solution or it will have some side effects. Would appreciate if TheStone or someone from GT can validate this, it would help many.
Thanks.
Quote:
The Authorization Options should be set:
auth_no_authentication: No
auth_allow_default: view
auth_modify_own: Yes
auth_user_field: This is the field name in the database used for storing the userid who owns the record.
The URL of default user to view all records:
db.cgi?db=table_name&do=search_results&keyword=*&uid=default
TheStone.
Gossamer Threads Inc.
It seems that the reason might be the code in Home.pm in Sub search_results. I changed the following 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} ) {
$self->{cgi}->{$self->{cfg}->{'auth_user_field'}} = $self->{user}->{'Username'};
$self->{cgi}->{"$self->{cfg}->{'auth_user_field'}-opt"} = '=';
}
=========
to
=========
# 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} ) {
# if Statement introduced to enable displaying of records for default user, and not put the condition
if ( $self->{user}->{'Username'} ne 'default' ) {
$self->{cgi}->{$self->{cfg}->{'auth_user_field'}} = $self->{user}->{'Username'};
$self->{cgi}->{"$self->{cfg}->{'auth_user_field'}-opt"} = '=';
}
}
=========
It seems to work now. I am not certain if this is a correct solution or it will have some side effects. Would appreciate if TheStone or someone from GT can validate this, it would help many.
Thanks.