Added OAUTH2.0 Admin Groups
now users are able to set admin users on theirs apps so multiple user could edit/review theirs apps Change-Id: Ic44bd9363a20d388f81acf2f4ed5c36deb4d4e85
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
{{ HTML::style('assets/css/main.css') }}
|
||||
{{ HTML::style('bower_assets/jquery-ui/themes/ui-darkness/jquery-ui.css') }}
|
||||
{{ HTML::style('bower_assets/fontawesome/css/font-awesome.min.css') }}
|
||||
{{ HTML::style('bower_assets/sweetalert/dist/sweetalert.css') }}
|
||||
@yield('css')
|
||||
</head>
|
||||
<body>
|
||||
@@ -31,10 +32,12 @@
|
||||
{{ HTML::script('bower_assets/jquery-validate/dist/additional-methods.min.js')}}
|
||||
{{ HTML::script('bower_assets/pure-templates/libs/pure.min.js')}}
|
||||
{{ HTML::script('bower_assets/uri.js/src/URI.min.js')}}
|
||||
{{ HTML::script('bower_assets/sweetalert/dist/sweetalert.min.js')}}
|
||||
{{ HTML::script('assets/js/ajax.utils.js')}}
|
||||
{{ HTML::script('assets/js/jquery.cleanform.js')}}
|
||||
{{ HTML::script('assets/js/jquery.serialize.js')}}
|
||||
{{ HTML::script('assets/js/jquery.validate.additional.custom.methods.js')}}
|
||||
@yield('scripts')
|
||||
<span class="version hidden">{{ Config::get('app.version') }}</span>
|
||||
</body>
|
||||
</html>
|
||||
@@ -27,7 +27,12 @@ Service Account : The OpenstackId OAuth 2.0 Authorization Server supports server
|
||||
<option value="SERVICE">Service Account</option>
|
||||
<option value="NATIVE">Native Application</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="admin_users">Admin Users <span class="glyphicon glyphicon-info-sign accordion-toggle" aria-hidden="true" title="Choose which users would be administrator of this application"></span></label>
|
||||
<input type="text" class="form-control" name="admin_users" id="admin_users">
|
||||
</div>
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
activate : '{{ URL::action("ApiScopeGroupController@activate",array("id"=>"@id")) }}',
|
||||
deactivate : '{{ URL::action("ApiScopeGroupController@deactivate",array("id"=>"@id")) }}',
|
||||
add : '{{URL::action("ApiScopeGroupController@create",null)}}',
|
||||
fetchUsers: '{{URL::action("ApiScopeGroupController@fetchUsers",null)}}'
|
||||
fetchUsers: '{{URL::action("UserApiController@fetch",null)}}'
|
||||
};
|
||||
var all_scopes = [];
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
activate : '{{ URL::action("ApiScopeGroupController@activate",array("id"=>"@id")) }}',
|
||||
deactivate : '{{ URL::action("ApiScopeGroupController@deactivate",array("id"=>"@id")) }}',
|
||||
add : '{{URL::action("ApiScopeGroupController@create",null)}}',
|
||||
fetchUsers: '{{URL::action("ApiScopeGroupController@fetchUsers",null)}}'
|
||||
fetchUsers: '{{URL::action("UserApiController@fetch",null)}}'
|
||||
};
|
||||
|
||||
var all_scopes = [];
|
||||
@@ -77,7 +77,7 @@
|
||||
@endforeach
|
||||
|
||||
@foreach($group->users()->get() as $user)
|
||||
current_users.push({ "id": {{$user->id}} , "value": "{{$user->getFullName().' ( '.$user->email.' )' }}" });
|
||||
current_users.push({ "id": {{$user->id}} , "value": "{{$user->getFullName() }}" });
|
||||
@endforeach
|
||||
|
||||
</script>
|
||||
|
||||
@@ -15,25 +15,31 @@
|
||||
<table id='tclients' class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Application Name</th>
|
||||
<th>Application Type</th>
|
||||
<th>Is Active</th>
|
||||
<th>Is Locked</th>
|
||||
<th>Modified</th>
|
||||
<th>Modified By</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="body-registered-clients">
|
||||
@foreach ($clients as $client)
|
||||
|
||||
<tr>
|
||||
<td>@if (!$client->isOwner(Auth::user()))<i title="you have admin rights on this application" class="fa fa-user"></i>@endif</td>
|
||||
<td>{{ $client->app_name }}</td>
|
||||
<td>{{ $client->getFriendlyApplicationType()}}</td>
|
||||
<td>
|
||||
@if ($client->isOwner(Auth::user()))
|
||||
<input type="checkbox" class="app-active-checkbox" id="app-active_{{$client->id}}"
|
||||
@if ( $client->active)
|
||||
@if ( $client->active)
|
||||
checked
|
||||
@endif
|
||||
value="{{$client->id}}"/>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" class="app-locked-checkbox" id="app-locked_{{$client->id}}"
|
||||
@@ -43,9 +49,12 @@
|
||||
value="{{$client->id}}" disabled="disabled" />
|
||||
</td>
|
||||
<td>{{ $client->updated_at }}</td>
|
||||
<td>{{ $client->getEditedByNice() }}</td>
|
||||
<td>
|
||||
{{ HTML::link(URL::action("AdminController@editRegisteredClient",array("id"=>$client->id)),'Edit',array('class'=>'btn btn-default btn-md active edit-client','title'=>'Edits a Registered Application')) }}
|
||||
@if ($client->canDelete(Auth::user()))
|
||||
{{ HTML::link(URL::action("ClientApiController@delete",array("id"=>$client->id)),'Delete',array('class'=>'btn btn-default btn-md active del-client','title'=>'Deletes a Registered Application')) }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -87,8 +96,16 @@
|
||||
delete: '{{ URL::action("ClientApiController@delete",array("id"=>"@id")) }}',
|
||||
add: '{{URL::action("ClientApiController@create",null)}}',
|
||||
activate: '{{ URL::action("ClientApiController@activate",array("id"=>"@id")) }}',
|
||||
deactivate: '{{ URL::action("ClientApiController@deactivate",array("id"=>"@id")) }}'
|
||||
deactivate: '{{ URL::action("ClientApiController@deactivate",array("id"=>"@id")) }}',
|
||||
fetchUsers: '{{URL::action("UserApiController@fetch",null)}}',
|
||||
};
|
||||
</script>
|
||||
{{ HTML::script('bower_assets/typeahead.js/dist/typeahead.bundle.js')}}
|
||||
{{ HTML::script('bower_assets/bootstrap-tagsinput/dist/bootstrap-tagsinput.js')}}
|
||||
{{ HTML::script('assets/js/oauth2/profile/clients.js') }}
|
||||
@stop
|
||||
@stop
|
||||
|
||||
@section('css')
|
||||
{{ HTML::style('bower_assets/bootstrap-tagsinput/dist/bootstrap-tagsinput.css') }}
|
||||
{{ HTML::style('bower_assets/bootstrap-tagsinput/dist/bootstrap-tagsinput-typeahead.css') }}
|
||||
@append
|
||||
@@ -25,7 +25,9 @@
|
||||
<div class="col-md-12">
|
||||
<label for="client_secret" class="label-client-secret">Client Secret</label>
|
||||
<span id="client_secret">{{ $client->client_secret }}</span>
|
||||
@if ($client->isOwner(Auth::user()))
|
||||
{{ HTML::link(URL::action("ClientApiController@regenerateClientSecret",array("id"=>$client->id)),'Regenerate',array('class'=>'btn btn-default btn-md active regenerate-client-secret','title'=>'Regenerates Client Secret')) }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -74,6 +76,11 @@
|
||||
<div class="col-md-12">
|
||||
<form id="form-application-main-data" name="form-application-main-data">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="admin_users">Admin Users <span class="glyphicon glyphicon-info-sign accordion-toggle" aria-hidden="true" title="Choose which users would be administrator of this application"></span></label>
|
||||
<input type="text" class="form-control" name="admin_users" id="admin_users" @if (!$client->isOwner(Auth::user()))disabled @endif>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="website">Application Web Site Url (optional) <span class="glyphicon glyphicon-info-sign accordion-toggle" aria-hidden="true"
|
||||
title="URL of the home page of the Client"></span></label>
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
@section('css')
|
||||
{{ HTML::style('bower_assets/bootstrap-tagsinput/dist/bootstrap-tagsinput.css') }}
|
||||
{{ HTML::style('bower_assets/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css') }}
|
||||
{{ HTML::style('bower_assets/bootstrap-tagsinput/dist/bootstrap-tagsinput-typeahead.css') }}
|
||||
{{ HTML::style('assets/css/edit-client.css') }}
|
||||
@append
|
||||
@section('scripts')
|
||||
{{ HTML::script('bower_assets/typeahead.js/dist/typeahead.bundle.js')}}
|
||||
{{ HTML::script('bower_assets/bootstrap-tagsinput/dist/bootstrap-tagsinput.js')}}
|
||||
{{ HTML::script('bower_assets/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js')}}
|
||||
<script type="application/javascript">
|
||||
@@ -20,7 +23,8 @@
|
||||
add_public_key: '{{URL::action("ClientPublicKeyApiController@create",array("id"=>$client->id))}}',
|
||||
get_public_keys: '{{URL::action("ClientPublicKeyApiController@getByPage",array("id"=>$client->id))}}',
|
||||
delete_public_key: '{{URL::action("ClientPublicKeyApiController@delete",array("id" => $client->id, 'public_key_id'=> '@public_key_id'))}}',
|
||||
update_public_key: '{{URL::action("ClientPublicKeyApiController@update",array("id" => $client->id, 'public_key_id'=> '@public_key_id'))}}'
|
||||
update_public_key: '{{URL::action("ClientPublicKeyApiController@update",array("id" => $client->id, 'public_key_id'=> '@public_key_id'))}}',
|
||||
fetchUsers: '{{URL::action("UserApiController@fetch",null)}}',
|
||||
};
|
||||
|
||||
var oauth2_supported_algorithms =
|
||||
@@ -33,6 +37,11 @@
|
||||
key_management_algorihtms: {{utils\ArrayUtils::toJson(oauth2\OAuth2Protocol::$supported_key_management_algorithms)}},
|
||||
content_encryption_algorihtms: {{utils\ArrayUtils::toJson(oauth2\OAuth2Protocol::$supported_content_encryption_algorithms)}}
|
||||
};
|
||||
var current_admin_users = [];
|
||||
|
||||
@foreach($client->admin_users()->get() as $user)
|
||||
current_admin_users.push({ "id": {{$user->id}} , "value": "{{ $user->getFullName() }}" });
|
||||
@endforeach
|
||||
|
||||
$(document).ready
|
||||
(
|
||||
@@ -44,7 +53,18 @@
|
||||
@append
|
||||
@section('content')
|
||||
@include('menu',array('is_oauth2_admin' => $is_oauth2_admin, 'is_openstackid_admin' => $is_openstackid_admin))
|
||||
<legend><span aria-hidden="true" class="glyphicon glyphicon-info-sign pointable" title="OAuth 2.0 allows users to share specific data with you (for example, contact lists) while keeping their usernames, passwords, and other information private."></span> {{$client->getFriendlyApplicationType()}} - Client {{ $client->app_name }}</legend>
|
||||
<legend>
|
||||
<span aria-hidden="true" class="glyphicon glyphicon-info-sign pointable"
|
||||
title="OAuth 2.0 allows users to share specific data with you (for example, contact lists) while keeping their usernames, passwords, and other information private.">
|
||||
|
||||
</span> {{$client->getFriendlyApplicationType()}} - Client {{ $client->app_name }}
|
||||
</legend>
|
||||
<div class="row">
|
||||
<div style="padding-left:15px" class="col-md-2 clear-padding"><strong>Created By: </strong></div><div class="col-md-10 clear-padding">{{ $client->getOwnerNice() }}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div style="padding-left:15px" class="col-md-2 clear-padding"><strong>Edited By</strong>: </div><div class="col-md-10 clear-padding">{{ $client->getEditedByNice() }}</div>
|
||||
</div>
|
||||
@if($errors->any())
|
||||
<div class="errors">
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user