Commit 7e7ef8b6 authored by Paul-Christian Volkmer's avatar Paul-Christian Volkmer
Browse files

Changed PreAuthorize annotations

parent 22059637
package de.thm.arsnova.connector.services;
import org.springframework.security.access.prepost.PreAuthorize;
import de.thm.arsnova.connector.persistence.domain.Configuration;
public interface ConfigurationService {
@PreAuthorize(value = "hasRole('ADMIN') or hasPermission(#username, 'configuration', 'read')")
Configuration getConfigurationElement(String key);
@PreAuthorize(value = "hasRole('ADMIN') or hasPermission(#username, 'configuration', 'write')")
void setConfigurationElement(Configuration config);
}
......@@ -7,10 +7,10 @@ import org.springframework.security.access.prepost.PreAuthorize;
import de.thm.arsnova.connector.persistence.domain.EnabledCategory;
public interface EnabledCategoryService {
@PreAuthorize(value = "hasRole('ADMIN')")
@PreAuthorize(value = "hasRole('ADMIN') or hasPermission(#username, 'enabled_category', 'write')")
public void enableCategory(int refId);
@PreAuthorize(value = "hasRole('ADMIN')")
@PreAuthorize(value = "hasRole('ADMIN') or hasPermission(#username, 'enabled_category', 'write')")
public void disableCategory(int refId);
public List<EnabledCategory> getEnabledCategories();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment