mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
add new ACL creation forms, none of them work yet, remove wrong icon... add correct icon
This commit is contained in:
parent
c0916ab7e9
commit
babecb6cd0
9 changed files with 270 additions and 34 deletions
|
@ -45,12 +45,13 @@ switch ($_REQUEST['action']) {
|
|||
show_confirmation(_('Updated'),_('Access List Entry updated'),'admin/access.php');
|
||||
break;
|
||||
case 'show_add_current':
|
||||
|
||||
require_once Config::get('prefix') . '/templates/show_add_access_current.inc.php';
|
||||
break;
|
||||
case 'show_add_rpc':
|
||||
require_once Config::get('prefix') . '/templates/show_add_access_rpc.inc.php';
|
||||
break;
|
||||
case 'show_add_local':
|
||||
|
||||
require_once Config::get('prefix') . '/templates/show_add_access_local.inc.php';
|
||||
break;
|
||||
case 'show_add_advanced':
|
||||
require_once Config::get('prefix') . '/templates/show_add_access.inc.php';
|
||||
|
|
BIN
images/icon_add_key.png
Normal file
BIN
images/icon_add_key.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 703 B |
Binary file not shown.
Before Width: | Height: | Size: 612 B |
|
@ -23,7 +23,7 @@
|
|||
***/
|
||||
|
||||
// SVN Fluf
|
||||
$svn_version = trim('$Rev$','$');
|
||||
$svn_version = 'Subversion ' . trim('$Rev$','$ ');
|
||||
|
||||
// Use output buffering, this gains us a few things and
|
||||
// fixes some CSS issues
|
||||
|
@ -88,7 +88,7 @@ if (!count($results)) {
|
|||
}
|
||||
|
||||
/** This is the version.... fluf nothing more... **/
|
||||
$results['version'] = '3.5-Alpha2 Build (' . $svn_version . ')';
|
||||
$results['version'] = '3.5-Alpha2 '. $svn_version;
|
||||
$results['int_config_version'] = '9';
|
||||
|
||||
$results['raw_web_path'] = $results['web_path'];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/*
|
||||
|
||||
Copyright (c) 2001 - 2007 Ampache.org
|
||||
Copyright (c) Ampache.org
|
||||
All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
|
@ -19,49 +19,34 @@
|
|||
|
||||
*/
|
||||
?>
|
||||
<?php show_box_top(_('Add Access for a Host')); ?>
|
||||
<?php show_box_top(_('Advanced Add')); ?>
|
||||
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
|
||||
<table class="tabledata" cellpadding="5" cellspacing="0">
|
||||
<tr>
|
||||
<td><?php echo _('Name'); ?>:</td>
|
||||
<td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Start IP Address'); ?>:</td>
|
||||
<td>
|
||||
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
|
||||
<span class="information">(255.255.255.255)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('End IP Address'); ?>:</td>
|
||||
<td>
|
||||
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
|
||||
<span class="information">(255.255.255.255)</span>
|
||||
<td><?php echo _('Level'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input name="level" type="radio" checked="checked" value="5" /> <?php echo _('View'); ?>
|
||||
<input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
|
||||
<input name="level" type="radio" value="50" /> <?php echo _('Read/Write'); ?>
|
||||
<input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('User'); ?>:</td>
|
||||
<td>
|
||||
<td colspan="3">
|
||||
<?php show_user_select('user'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Level'); ?>:</td>
|
||||
<td>
|
||||
<select name="level">
|
||||
<option selected="selected" value="5" ><?php echo _('View'); ?></option>
|
||||
<option value="25"><?php echo _('Read'); ?></option>
|
||||
<option value="50"><?php echo _('Read/Write'); ?></option>
|
||||
<option value="75"><?php echo _('All'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo _('ACL Type'); ?>:</td>
|
||||
<td>
|
||||
<td colspan="3">
|
||||
<select name="type">
|
||||
<option selected="selected" value="stream"><?php echo _('Stream Access'); ?></option>
|
||||
<option value="interface"><?php echo _('Web Interface'); ?></option>
|
||||
|
@ -71,16 +56,33 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><h4><?php echo _('RPC Options'); ?></h4></td>
|
||||
<td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Remote Key'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['key']); ?>" maxlength="32" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
|
||||
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Start'); ?>:</td>
|
||||
<td>
|
||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
|
||||
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
|
||||
</td>
|
||||
<td><?php echo _('End'); ?>:</td>
|
||||
<td>
|
||||
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="formValidation">
|
||||
<?php Core::form_register('add_acl'); ?>
|
||||
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
|
61
templates/show_add_access_current.inc.php
Normal file
61
templates/show_add_access_current.inc.php
Normal file
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
/*
|
||||
|
||||
Copyright (c) Ampache.org
|
||||
All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License v2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
?>
|
||||
<?php show_box_top(_('Add Current Host')); ?>
|
||||
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
|
||||
<table class="tabledata" cellpadding="5" cellspacing="0">
|
||||
<tr>
|
||||
<td><?php echo _('Name'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Level'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
|
||||
<input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
|
||||
<input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
|
||||
<input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('User'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<?php show_user_select('user'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Remote Key'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="formValidation">
|
||||
<?php Core::form_register('add_acl'); ?>
|
||||
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
|
||||
</div>
|
||||
</form>
|
||||
<?php show_box_bottom(); ?>
|
86
templates/show_add_access_local.inc.php
Normal file
86
templates/show_add_access_local.inc.php
Normal file
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
/*
|
||||
|
||||
Copyright (c) Ampache.org
|
||||
All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License v2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
?>
|
||||
<?php show_box_top(_('Add Local Network Definition')); ?>
|
||||
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
|
||||
<table class="tabledata" cellpadding="5" cellspacing="0">
|
||||
<tr>
|
||||
<td><?php echo _('Name'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Level'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
|
||||
<input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
|
||||
<input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
|
||||
<input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('User'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<?php show_user_select('user'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top"><?php echo _('Type'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="radio" name="type" value="network" /><?php echo _('Local Network Definition'); ?><br />
|
||||
<input type="radio" name="type" value="streamnetwork" /><?php echo _('Local Network Definition'); ?> + <?php echo _('Stream Access'); ?> + <?php echo _('Web Interface'); ?><br />
|
||||
<input type="radio" name="type" value="allnetwork" checked="checked" /><?php echo _('Local Network Definition'); ?> + <?php echo _('All'); ?><br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Remote Key'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['end']); ?>" maxlength="32" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
|
||||
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Start'); ?>:</td>
|
||||
<td>
|
||||
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
|
||||
</td>
|
||||
<td><?php echo _('End'); ?>:</td>
|
||||
<td>
|
||||
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="formValidation">
|
||||
<?php Core::form_register('add_acl'); ?>
|
||||
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
|
||||
</div>
|
||||
</form>
|
||||
<?php show_box_bottom(); ?>
|
86
templates/show_add_access_rpc.inc.php
Normal file
86
templates/show_add_access_rpc.inc.php
Normal file
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
/*
|
||||
|
||||
Copyright (c) Ampache.org
|
||||
All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License v2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
?>
|
||||
<?php show_box_top(_('Add API / RPC Host')); ?>
|
||||
<form name="update_catalog" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/access.php?action=add_host">
|
||||
<table class="tabledata" cellpadding="5" cellspacing="0">
|
||||
<tr>
|
||||
<td><?php echo _('Name'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="name" value="<?php echo scrub_out($_REQUEST['name']); ?>" size="20" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Level'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input name="level" type="radio" value="5" /> <?php echo _('View'); ?>
|
||||
<input name="level" type="radio" value="25" /> <?php echo _('Read'); ?>
|
||||
<input name="level" type="radio" checked="checked" value="50" /> <?php echo _('Read/Write'); ?>
|
||||
<input name="level" type="radio" value="75" /> <?php echo _('All'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('User'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<?php show_user_select('user'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top"><?php echo _('Type'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="radio" name="type" value="rpc" /><?php echo _('RPC'); ?><br />
|
||||
<input type="radio" name="type" value="streamrpc" checked="checked" /><?php echo _('RPC'); ?> + <?php echo _('Stream Access'); ?><br />
|
||||
<input type="radio" name="type" value="allrpc" /><?php echo _('RPC'); ?> + <?php echo _('All'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><h4><?php echo _('RPC Options'); ?></h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Remote Key'); ?>:</td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="key" value="<?php echo scrub_out($_REQUEST['key']); ?>" maxlength="32" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4"><h3><?php echo _('IPv4 or IPv6 Addresses'); ?></h3>
|
||||
<span class="information">(255.255.255.255) / (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo _('Start'); ?>:</td>
|
||||
<td>
|
||||
<input type="text" name="start" value="<?php echo scrub_out($_REQUEST['start']); ?>" size="20" maxlength="15" />
|
||||
</td>
|
||||
<td><?php echo _('End'); ?>:</td>
|
||||
<td>
|
||||
<input type="text" name="end" value="<?php echo scrub_out($_REQUEST['end']); ?>" size="20" maxlength="15" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="formValidation">
|
||||
<?php Core::form_register('add_acl'); ?>
|
||||
<input class="button" type="submit" value="<?php echo _('Create ACL'); ?>" />
|
||||
</div>
|
||||
</form>
|
||||
<?php show_box_bottom(); ?>
|
|
@ -36,7 +36,7 @@
|
|||
</li>
|
||||
<li><h4><?php echo _('Access Control'); ?></h4>
|
||||
<ul class="sb3" id="sb_admin_acl">
|
||||
<li id="sb_admin_acl_AddAccess"><a href="<?php echo $web_path; ?>/admin/access.php?action=show_add_host"><?php echo _('Add ACL'); ?></a></li>
|
||||
<li id="sb_admin_acl_AddAccess"><a href="<?php echo $web_path; ?>/admin/access.php?action=show_add_advanced"><?php echo _('Add ACL'); ?></a></li>
|
||||
<li id="sb_admin_acl_ShowAccess"><a href="<?php echo $web_path; ?>/admin/access.php"><?php echo _('Show ACL(s)'); ?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue