ispman/ispman-web/cgi-bin/tmpl/vhosts edit_acls.tmpl,1.4,1.4.2.1
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4729/ispman-web/cgi-bin/tmpl/vhosts
Modified Files:
Tag: rel_1_1-bugfixes
edit_acls.tmpl
Log Message:
merging fixes from HEAD (up to 1.6)
fixes [ 971077 ] domain users for website acls
Index: edit_acls.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/vhosts/edit_acls.tmpl,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -d -r1.4 -r1.4.2.1
--- edit_acls.tmpl 13 Jan 2004 16:05:49 -0000 1.4
+++ edit_acls.tmpl 11 Jun 2004 18:38:36 -0000 1.4.2.1
@@ -1,4 +1,4 @@
-<table>
+<table>
<tr>
<td valign=top>
<perl>_("Website Access control")</perl> <br>
@@ -33,9 +33,9 @@
for (sort {length($b) <=> length($a)} keys %$ACLs){
$text.="<tr>";
if ($r->param("ispmanVhostAclLocation") && $r->param("ispmanVhostAclLocation") eq $ACLs->{$_}{'ispmanVhostAclLocation'}){
- $text.=qq|\n<form name=ACLEditForm>\n
- <td valign=top>
- $ACLs->{$_}{'ispmanVhostAclLocation'}
+ $text.=qq|\n<form name=ACLEditForm>\n
+ <td valign=top>
+ $ACLs->{$_}{'ispmanVhostAclLocation'}
</td>
<td valign=top> <select name=ispmanVhostAclAllowUser multiple size=5>|;
my $allowedUsers={};
@@ -53,8 +53,16 @@
}
my $domainusers=$ispman->getDomainUsersForDomain($r->param('ispmanDomain'));
for $domainuser(keys %$domainusers){
- my $exploded_dn=$ispman->explodeDN($domainusers->{$domainuser});
- my $uid=$exploded_dn->{'uid'};
+ my $exploded_dn=$ispman->explodeDN($domainusers->{$domainuser});
+ my $uid=$exploded_dn->{'uid'};
+
+ # FIXME!!!
+ # Really dirty hack to fake the ispmanUserId which can not easily retrieved here.
+ # This will get fixed with new ISPMan Core Libs
+ my $domain = $r->param("ispmanDomain");
+ $domain =~ s/\./_/;
+ $uid =~ s/_$domain//;
+
$text.="<option value='$uid'";
if ($allowedUsers->{$uid}) {
$text.=" selected ";
@@ -68,7 +76,7 @@
<input type=hidden name=ispmanVhostAclLocation value="$ACLs->{$_}{'ispmanVhostAclLocation'}">
<input type=hidden name=ispmanDomain value="@{[$r->param('ispmanDomain')]}">
<input type=hidden name=ispmanVhostName value="@{[$r->param('ispmanVhostName')]}">
- <input type=hidden name=mode value="updateVhostAcl">
+ <input type=hidden name=mode value="updateVhostAcl">
</form>
<td><a href="@{[$r->url]}?mode=deleteVhostAcl§ion=acls&ispmanDomain=@{[$r->param("ispmanDomain")]}&ispmanVhostName=@{[$r->param("ispmanVhostName")]}&ispmanVhostAclLocation=$ACLs->{$_}{'ispmanVhostAclLocation'}">@{[_('Delete')]}</a></td>
|;
@@ -99,12 +107,12 @@
$text
</perl>
- <tr class=control>
+ <tr class=control>
<form name=NewVhostACLForm>
<td valign=top class=control><input type=text name=newIspmanVhostAclLocation value=""></td>
<td valign=top class=control>
<select MULTIPLE size=5 name=newIspmanVhostAclAllowUser>
- <perl>
+ <perl>
$text='';
my $webusers=$ispman->getWebusers($r->param('ispmanDomain'));
for $webuser(keys %$webusers){
@@ -115,10 +123,18 @@
<perl>
$text="";
- my $users=$ispman->getDomainUsersForDomain($r->param('ispmanDomain'));
- for my $user(keys %$users) {
- my $exploded_dn=$ispman->explodeDN($users->{$user});
- my $uid=$exploded_dn->{'uid'};
+ my $users=$ispman->getDomainUsersForDomain($r->param('ispmanDomain'));
+ for my $user(keys %$users) {
+ my $exploded_dn=$ispman->explodeDN($users->{$user});
+ my $uid=$exploded_dn->{'uid'};
+
+ # FIXME!!!
+ # Really dirty hack to fake the ispmanUserId which can not easily retrieved here.
+ # This will get fixed with new ISPMan Core Libs
+ my $domain = $r->param("ispmanDomain");
+ $domain =~ s/\./_/;
+ $uid =~ s/_$domain//;
+
$text.="<option value='$uid'>domainuser: $uid</option>\n";
}
$text
@@ -128,15 +144,15 @@
<input type=hidden name=mode value="addVhostAcl">
<input type=hidden name=ispmanVhostName value="<perl>$r->param("ispmanVhostName")</perl>">
<input type=hidden name=ispmanDomain value="<perl>$r->param("ispmanDomain")</perl>">
- <td colspan=2><input type=submit value="<perl>_('Add new protected area')</perl>"></td>
- </form>
+ <td colspan=2><input type=submit value="<perl>_('Add new protected area')</perl>"></td>
+ </form>
</tr>
</table>
-
-
-
+
+
+
</td>
</tr>
-</table>
+</table>
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504