version 1.104, 2005/06/17 21:04:40
|
version 1.109, 2005/09/13 19:13:22
|
Line 108 sub my_custom_roles {
|
Line 108 sub my_custom_roles {
|
|
|
sub authorpriv { |
sub authorpriv { |
my ($auname,$audom)=@_; |
my ($auname,$audom)=@_; |
unless (&Apache::lonnet::allowed('cca',$audom.'/'.$auname)) { return ''; } |
unless ((&Apache::lonnet::allowed('cca',$audom.'/'.$auname)) |
|
|| (&Apache::lonnet::allowed('caa',$audom.'/'.$auname))) { return ''; } |
return 1; |
return 1; |
} |
} |
|
|
Line 155 $lt{'dom'}:</td><td>$domform</td></tr>
|
Line 156 $lt{'dom'}:</td><td>$domform</td></tr>
|
</table> |
</table> |
<input name="userrole" type="submit" value="$lt{usrr}" /> |
<input name="userrole" type="submit" value="$lt{usrr}" /> |
</form> |
</form> |
|
ENDDOCUMENT |
|
if (&Apache::lonnet::allowed('mcr','/')) { |
|
$r->print(<<ENDCUSTOM); |
<form action="/adm/createuser" method="post" name="docustom"> |
<form action="/adm/createuser" method="post" name="docustom"> |
<input type="hidden" name="phase" value="selected_custom_edit"> |
<input type="hidden" name="phase" value="selected_custom_edit"> |
<h2>$lt{'ecrp'}$helpecpr</h2> |
<h2>$lt{'ecrp'}$helpecpr</h2> |
$lt{'nr'}: $choice <input type="text" size="15" name="newrolename" /><br /> |
$lt{'nr'}: $choice <input type="text" size="15" name="newrolename" /><br /> |
<input name="customeditor" type="submit" value="$lt{'cre'}" /> |
<input name="customeditor" type="submit" value="$lt{'cre'}" /> |
</body> |
</form> |
</html> |
ENDCUSTOM |
ENDDOCUMENT |
} |
|
$r->print('</body></html>'); |
} |
} |
|
|
# =================================================================== Phase two |
# =================================================================== Phase two |
Line 571 END
|
Line 576 END
|
$class='Domain'; |
$class='Domain'; |
} |
} |
} |
} |
if ($role_code eq 'ca') { |
if (($role_code eq 'ca') || ($role_code eq 'aa')) { |
$area=~/\/(\w+)\/(\w+)/; |
$area=~/\/(\w+)\/(\w+)/; |
if (&authorpriv($2,$1)) { |
if (&authorpriv($2,$1)) { |
$allowed=1; |
$allowed=1; |
Line 660 END
|
Line 665 END
|
my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain); |
my $currentauth=&Apache::lonnet::queryauthenticate($ccuname,$ccdomain); |
if ($currentauth=~/^krb(4|5):/) { |
if ($currentauth=~/^krb(4|5):/) { |
$currentauth=~/^krb(4|5):(.*)/; |
$currentauth=~/^krb(4|5):(.*)/; |
my $krbdefdom=$1; |
my $krbdefdom=$2; |
my %param = ( formname => 'document.cu', |
my %param = ( formname => 'document.cu', |
kerb_def_dom => $krbdefdom |
kerb_def_dom => $krbdefdom |
); |
); |
Line 775 ENDOTHERAUTHS
|
Line 780 ENDOTHERAUTHS
|
'sta' => "Start", |
'sta' => "Start", |
'end' => "End", |
'end' => "End", |
'cau' => "Co-Author", |
'cau' => "Co-Author", |
|
'caa' => "Assistant Co-Author", |
'ssd' => "Set Start Date", |
'ssd' => "Set Start Date", |
'sed' => "Set End Date" |
'sed' => "Set End Date" |
); |
); |
Line 793 ENDOTHERAUTHS
|
Line 799 ENDOTHERAUTHS
|
<a href= |
<a href= |
"javascript:pjump('date_end','End Date Co-Author',document.cu.end_$cudom\_$cuname\_ca.value,'end_$cudom\_$cuname\_ca','cu.pres','dateset')">$lt{'sed'}</a></td> |
"javascript:pjump('date_end','End Date Co-Author',document.cu.end_$cudom\_$cuname\_ca.value,'end_$cudom\_$cuname\_ca','cu.pres','dateset')">$lt{'sed'}</a></td> |
</tr> |
</tr> |
|
<tr> |
|
<td><input type=checkbox name="act_$cudom\_$cuname\_aa" /></td> |
|
<td>$lt{'caa'}</td> |
|
<td>$cudom\_$cuname</td> |
|
<td><input type=hidden name="start_$cudom\_$cuname\_aa" value='' /> |
|
<a href= |
|
"javascript:pjump('date_start','Start Date Assistant Co-Author',document.cu.start_$cudom\_$cuname\_aa.value,'start_$cudom\_$cuname\_aa','cu.pres','dateset')">$lt{'ssd'}</a></td> |
|
<td><input type=hidden name="end_$cudom\_$cuname\_aa" value='' /> |
|
<a href= |
|
"javascript:pjump('date_end','End Date Assistant Co-Author',document.cu.end_$cudom\_$cuname\_aa.value,'end_$cudom\_$cuname\_aa','cu.pres','dateset')">$lt{'sed'}</a></td> |
|
</tr> |
</table> |
</table> |
ENDCOAUTH |
ENDCOAUTH |
} |
} |
Line 1533 sub set_custom_role {
|
Line 1550 sub set_custom_role {
|
$env{'user.name'}, |
$env{'user.name'}, |
$rolename)); |
$rolename)); |
} |
} |
|
$r->print('<p><a href="/adm/createuser">Create another role, or Create/Modify a user.</a></p>'); |
$r->print('</body></html>'); |
$r->print('</body></html>'); |
} |
} |
|
|