one step forward, two steps back.
i want to display special text next to each record in List All if the user looking at the record has permission to modify the record. No text or different text should appear next to records for which this person does not have permission to modify. i have $auth_modify_own = 1 and $auth_view_own = 0. i added the following code right before the closing table tag in db.cgi, sub build_html_record:
if ($per_mod && $instmod) {
my ($restricted);
($restricted = 1) if ($auth_modify_own && !$per_admin && ($db_userid ne $rec{$field[$auth_user_field]}));
if (!$restricted) {
i can't get $db_userid part of this to work and i've tried a jillion things. i want to compare the logged in user (i thought this is $db_userid) to the record owner. what am i doing wrong?
i want to display special text next to each record in List All if the user looking at the record has permission to modify the record. No text or different text should appear next to records for which this person does not have permission to modify. i have $auth_modify_own = 1 and $auth_view_own = 0. i added the following code right before the closing table tag in db.cgi, sub build_html_record:
Code:
if ($per_mod && $instmod) {
my ($restricted);
($restricted = 1) if ($auth_modify_own && !$per_admin && ($db_userid ne $rec{$field[$auth_user_field]}));
if (!$restricted) {
i can't get $db_userid part of this to work and i've tried a jillion things. i want to compare the logged in user (i thought this is $db_userid) to the record owner. what am i doing wrong?