fixes
This commit is contained in:
parent
1ec8e63e9e
commit
919a3f1b91
4 changed files with 7 additions and 5 deletions
|
@ -66,7 +66,7 @@
|
||||||
<div class="form-group clearfix block">
|
<div class="form-group clearfix block">
|
||||||
<label class="col-md-2 control-label" for="userEnabled">User Enabled</label>
|
<label class="col-md-2 control-label" for="userEnabled">User Enabled</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input ng-model="user.enabled" name="userEnabled" id="userEnabled" onoffswitch />
|
<input ng-model="user.enabled" name="userEnabled" id="userEnabled" ng-disabled="!access.manageUsers" onoffswitch />
|
||||||
</div>
|
</div>
|
||||||
<kc-tooltip>A disabled user cannot login.</kc-tooltip>
|
<kc-tooltip>A disabled user cannot login.</kc-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
<div class="form-group clearfix block">
|
<div class="form-group clearfix block">
|
||||||
<label class="col-md-2 control-label" for="emailVerified">Email verified</label>
|
<label class="col-md-2 control-label" for="emailVerified">Email verified</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input ng-model="user.emailVerified" name="emailVerified" id="emailVerified" onoffswitch />
|
<input ng-model="user.emailVerified" name="emailVerified" id="emailVerified" ng-disabled="!access.manageUsers" onoffswitch />
|
||||||
</div>
|
</div>
|
||||||
<kc-tooltip>Has the user's email been verified?</kc-tooltip>
|
<kc-tooltip>Has the user's email been verified?</kc-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="kc-table-actions" colspan="6">
|
<th class="kc-table-actions" colspan="6">
|
||||||
<div class="pull-right">
|
<div class="pull-right" data-ng-show="access.manageUsers">
|
||||||
<a class="btn btn-primary" ng-click="logoutAll()">Logout All Sessions</a>
|
<a class="btn btn-primary" ng-click="logoutAll()">Logout All Sessions</a>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td><a href="" ng-click="logoutSession(session.id)">logout</a> </td>
|
<td><a data-ng-show="access.manageUsers" href="" ng-click="logoutSession(session.id)">logout</a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -280,6 +280,7 @@ public class RealmAdminResource {
|
||||||
@Path("logout-all")
|
@Path("logout-all")
|
||||||
@POST
|
@POST
|
||||||
public GlobalRequestResult logoutAll() {
|
public GlobalRequestResult logoutAll() {
|
||||||
|
auth.init(RealmAuth.Resource.USER).requireManage();
|
||||||
session.sessions().removeUserSessions(realm);
|
session.sessions().removeUserSessions(realm);
|
||||||
adminEvent.operation(OperationType.ACTION).resourcePath(uriInfo).success();
|
adminEvent.operation(OperationType.ACTION).resourcePath(uriInfo).success();
|
||||||
return new ResourceAdminManager(session).logoutAll(uriInfo.getRequestUri(), realm);
|
return new ResourceAdminManager(session).logoutAll(uriInfo.getRequestUri(), realm);
|
||||||
|
@ -294,6 +295,7 @@ public class RealmAdminResource {
|
||||||
@Path("sessions/{session}")
|
@Path("sessions/{session}")
|
||||||
@DELETE
|
@DELETE
|
||||||
public void deleteSession(@PathParam("session") String sessionId) {
|
public void deleteSession(@PathParam("session") String sessionId) {
|
||||||
|
auth.init(RealmAuth.Resource.USER).requireManage();
|
||||||
UserSessionModel userSession = session.sessions().getUserSession(realm, sessionId);
|
UserSessionModel userSession = session.sessions().getUserSession(realm, sessionId);
|
||||||
if (userSession == null) throw new NotFoundException("Sesssion not found");
|
if (userSession == null) throw new NotFoundException("Sesssion not found");
|
||||||
AuthenticationManager.backchannelLogout(session, realm, userSession, uriInfo, connection, headers, true);
|
AuthenticationManager.backchannelLogout(session, realm, userSession, uriInfo, connection, headers, true);
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class AccountTest {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
//@Test
|
||||||
public void ideTesting() throws Exception {
|
public void ideTesting() throws Exception {
|
||||||
Thread.sleep(100000000);
|
Thread.sleep(100000000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue