Skip to content
Snippets Groups Projects
Verified Commit 726cf51f authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC: Comments added.

parent af749c66
No related branches found
No related tags found
2 merge requests!58REL: prepare release 0.7.2,!45F grpc f acm
Pipeline #17080 failed
......@@ -282,6 +282,10 @@ public class UserSources extends HashMap<String, UserSource> {
return false;
}
/**
* Log the current time as the user's last visit.
*
*/
public static void logUserVisit(String realm, String username, String type) {
try {
LogUserVisitTransaction t =
......
......@@ -21,5 +21,6 @@ package org.caosdb.server.database.backend.interfaces;
public interface LogUserVisitImpl extends BackendTransactionImpl {
/** Return true if this is not the first visit of this user. */
boolean logUserReturnIsKnown(long timestamp, String realm, String username, String type);
}
......@@ -288,6 +288,7 @@ public class AccessControlManagementServiceImpl extends AccessControlManagementS
.build();
}
/** What can be done with this role. */
private Iterable<? extends RoleCapabilities> getRoleCapabilities(Role role) {
List<RoleCapabilities> result = new LinkedList<>();
if (org.caosdb.server.permissions.Role.ADMINISTRATION.toString().equals(role.name)) {
......@@ -304,6 +305,7 @@ public class AccessControlManagementServiceImpl extends AccessControlManagementS
return result;
}
/** The permissions of the current user w.r.t. this role. */
private Iterable<? extends RolePermissions> getRolePermissions(Role role) {
List<RolePermissions> result = new LinkedList<>();
Subject current_user = SecurityUtils.getSubject();
......
......@@ -43,6 +43,9 @@ import org.caosdb.server.utils.ServerMessages;
import org.caosdb.server.utils.Utils;
import org.jdom2.Element;
/**
* This transaction also checks if the current user has sufficient permissions to make the update.
*/
public class UpdateUserTransaction extends AccessControlTransaction {
private final String password;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment