mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
Cleanup
This commit is contained in:
@@ -35,11 +35,8 @@ package sonia.scm;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import com.github.sdorra.ssp.PermissionCheck;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* The base class of all handlers.
|
||||
@@ -78,15 +75,4 @@ public interface HandlerBase<T extends TypedObject>
|
||||
* @throws IOException
|
||||
*/
|
||||
void modify(T object) throws NotFoundException;
|
||||
|
||||
/**
|
||||
* Modifies a persistent object after checking with the given permission checker.
|
||||
*
|
||||
* @param object to modify
|
||||
* @param permissionChecker check permission before to modify
|
||||
* @throws IOException
|
||||
*/
|
||||
default void modify(T object, Function<T, PermissionCheck> permissionChecker) throws NotFoundException{
|
||||
modify(object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package sonia.scm.util;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
|
||||
public class AuthenticationUtil {
|
||||
|
||||
public static String getAuthenticatedUsername() {
|
||||
Object subject = SecurityUtils.getSubject().getPrincipal();
|
||||
AssertUtil.assertIsNotNull(subject);
|
||||
return subject.toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user