keycloak-aplcache
Changes
examples/authz/photoz/README.md 2(+1 -1)
Details
diff --git a/examples/authz/photoz/photoz-html5-client/src/main/webapp/js/app.js b/examples/authz/photoz/photoz-html5-client/src/main/webapp/js/app.js
index b552391..0a6bf48 100755
--- a/examples/authz/photoz/photoz-html5-client/src/main/webapp/js/app.js
+++ b/examples/authz/photoz/photoz-html5-client/src/main/webapp/js/app.js
@@ -82,7 +82,9 @@ module.controller('TokenCtrl', function ($scope, Identity) {
}
$scope.requestEntitlements = function () {
- Identity.authorization.entitlement('photoz-restful-api').then(function (rpt) {});
+ Identity.authorization.entitlement('photoz-restful-api').then(function (rpt) {
+ $scope.showRpt()
+ });
}
$scope.Identity = Identity;
@@ -99,6 +101,9 @@ module.controller('AlbumCtrl', function ($scope, $http, $routeParams, $location,
$location.path('/');
});
};
+ $scope.goto = function (path) {
+ $location.path(path)
+ }
});
module.controller('ProfileCtrl', function ($scope, $http, $routeParams, $location, Profile) {
diff --git a/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/admin/albums.html b/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/admin/albums.html
index c0cc6e1..0f4da14 100644
--- a/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/admin/albums.html
+++ b/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/admin/albums.html
@@ -1,4 +1,4 @@
-<h1>All Albums</h1>
+<h2>All Albums</h2>
<table class="table" data-ng-repeat="(key, value) in albums">
<thead>
<tr>
@@ -16,4 +16,7 @@
</td>
</tr>
</tbody>
-</table>
\ No newline at end of file
+</table>
+<p>
+<a href="#/">Back to main page</a>
+</p>
\ No newline at end of file
diff --git a/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/album/create.html b/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/album/create.html
index d9ddd25..0433f49 100644
--- a/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/album/create.html
+++ b/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/album/create.html
@@ -1,7 +1,7 @@
-<h1>Create an Album</h1>
+<h2>Create an Album</h2>
<form>
Name: <input type="text" id="album.name" ng-model="album.name"/>
- <button ng-click="create()" id="save-album">Save</button>
+ <button ng-click="create()" id="save-album">Save</button> <button ng-click="goto('/')">Cancel</button>
</form>
diff --git a/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/album/detail.html b/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/album/detail.html
index cf32df1..096e08c 100644
--- a/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/album/detail.html
+++ b/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/album/detail.html
@@ -1 +1,4 @@
-<h1>{{album.name}}</h1>
\ No newline at end of file
+<h2>{{album.name}}</h2>
+
+<div data-ng-show="Identity.isAdmin()"><a href="#/admin/album">Back to albums</a></div>
+<div data-ng-show="!Identity.isAdmin()"><a href="#/">Back to main page</a></div>
\ No newline at end of file
diff --git a/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/profile.html b/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/profile.html
index c6f6750..4cf5d14 100644
--- a/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/profile.html
+++ b/examples/authz/photoz/photoz-html5-client/src/main/webapp/partials/profile.html
@@ -1,6 +1,9 @@
-<h1>My Profile</h1>
+<h2>My Profile</h2>
<form>
<p>Name: {{profile.userName}}</p>
<p>Total of albums: {{profile.totalAlbums}}</p>
</form>
+<p>
+ <a href="#/">Back to main page</a>
+</p>
examples/authz/photoz/README.md 2(+1 -1)
diff --git a/examples/authz/photoz/README.md b/examples/authz/photoz/README.md
index 8ae6b7c..7dedbff 100644
--- a/examples/authz/photoz/README.md
+++ b/examples/authz/photoz/README.md
@@ -73,7 +73,7 @@ open the ``Client Details`` page. Once there, click on the `Authorization` tab.
Click on the ``Select file`` button, which means you want to import a resource server configuration. Now select the file that is located at:
- examples/authz/photoz/photoz-restful-api/src/main/resources/photoz-restful-api-authz-service.json
+ examples/authz/photoz/photoz-restful-api/target/classes/photoz-restful-api-authz-service.json
Now click ``Upload`` and the resource server will be updated accordingly.