Project

General

Profile

« Previous | Next » 

Revision 2645

Added by sgarg about 19 years ago

If skin cfg specified access rights to be included for a certain set of users and groups, then those are entered in the access permissions given.

View differences:

src/perl/register-dataset.cgi
85 85
$config->define("temporalRequired", { DEFAULT => 'true'} );
86 86
$config->define("spatialRequired", { DEFAULT => 'true'} );
87 87
$config->define("publicReadable", { DEFAULT => 'true'} );
88
$config->define("accessPrincipals", { DEFAULT => ''} );
89
$config->define("accessType", { DEFAULT => ''} );
88 90
$config->define("mailhost");
89 91
$config->define("sender");
90 92
$config->define("recipient");
......
143 145
my $temporalRequired = $config->temporalRequired();
144 146
my $spatialRequired = $config->spatialRequired();
145 147
my $publicReadable = $config->publicReadable();
148
my $accessPrincipals = $config->accessPrincipals();
149
my $accessType = $config->accessType();
146 150
my $mailhost = $config->mailhost();
147 151
my $sender = $config->sender();
148 152
my $recipient = $config->recipient();
......
1431 1435
    	$doc .= "<permission>read</permission>\n";
1432 1436
    	$doc .= "</allow>\n";
1433 1437
    }
1438
    foreach(split(":",$accessPrincipals)){
1439
    	$doc .= "<allow>\n";
1440
    	$doc .= "<principal>".$_."</principal>\n";
1441
    	$doc .= "<permission>".$accessType."</permission>\n";
1442
    	$doc .= "</allow>\n";
1443
    }
1434 1444
    $doc .= "</access>\n";
1435 1445
    
1436 1446
    $doc .= "</dataset>\n</eml:eml>\n";

Also available in: Unified diff