* new c.users.role 'lintercept', that set to when an admin user has
enabled 'lawful_intercept' flag
* only Administrator page /api/admins and /api/interceptions are available for
the role
* 'lintercept' role can only see own user and only change password
and email
Change-Id: Iadcb022a124afbd77b224e734026f380af0170e8
changes/97/40597/4
parent
9411eb6998
commit
7862a87639
@ -0,0 +1,32 @@
|
||||
package NGCP::Panel::Form::Administrator::LIntercept;
|
||||
use HTML::FormHandler::Moose;
|
||||
use HTML::FormHandler::Widget::Block::Bootstrap;
|
||||
use NGCP::Panel::Utils::Form;
|
||||
extends 'HTML::FormHandler';
|
||||
|
||||
has '+widget_wrapper' => (default => 'Bootstrap');
|
||||
has_field 'submitid' => ( type => 'Hidden' );
|
||||
sub build_render_list {[qw/submitid fields actions/]}
|
||||
sub build_form_element_class {[qw(form-horizontal)]}
|
||||
|
||||
has_field 'password' => (type => 'Password', required => 1, label => 'Password');
|
||||
has_field 'email' => (type => 'Email', required => 0, label => 'Email', maxlength => 255);
|
||||
has_field 'save' => (type => 'Submit', element_class => [qw(btn btn-primary)],);
|
||||
has_block 'fields' => (
|
||||
tag => 'div',
|
||||
class => [qw(modal-body)],
|
||||
render_list => [qw(
|
||||
password email
|
||||
)],
|
||||
);
|
||||
has_block 'actions' => (tag => 'div', class => [qw(modal-footer)], render_list => [qw(save)],);
|
||||
|
||||
sub validate_password {
|
||||
my ($self, $field) = @_;
|
||||
my $c = $self->form->ctx;
|
||||
return unless $c;
|
||||
|
||||
NGCP::Panel::Utils::Form::validate_password(c => $c, field => $field);
|
||||
}
|
||||
|
||||
1;
|
||||
@ -0,0 +1,24 @@
|
||||
<li class="dropdown">
|
||||
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon-question-sign"></i>
|
||||
<span>[% c.loc('Documentation') | html %]</span>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="[% c.uri_for('/handbook/') %]" class="ngcp-noback-link">[% c.loc('Handbook') %]</a></li>
|
||||
[% FOR l IN c.config.external_documentation.link -%]
|
||||
<li><a href="[% l.url %]" class="ngcp-noback-link">[% l.name | html %]</a></li>
|
||||
[% END; -%]
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon-th"></i>
|
||||
<span>[% c.loc('Settings') %]</span>
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="[% c.uri_for('/administrator') %]">[% c.loc('Administrator') %]</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
[% # vim: set tabstop=4 syntax=html expandtab: -%]
|
||||
Loading…
Reference in new issue