本文整理了Java中org.springframework.security.access.prepost.PostAuthorize.<init>()
方法的一些代码示例,展示了PostAuthorize.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PostAuthorize.<init>()
方法的具体详情如下:
包路径:org.springframework.security.access.prepost.PostAuthorize
类名称:PostAuthorize
方法名:<init>
暂无
代码示例来源:origin: spring-projects/spring-security
@PostAuthorize("hasPermission(#object,'read')")
String postHasPermission(String object);
代码示例来源:origin: spring-projects/spring-security
@Override
@PostAuthorize("returnObject?.contains(authentication?.name)")
public Flux<String> fluxPostAuthorizeFindById(
long id) {
return delegate.fluxPostAuthorizeFindById(id);
}
代码示例来源:origin: spring-projects/spring-security
@Override
@PostAuthorize("returnObject?.contains(authentication?.name)")
public Mono<String> monoPostAuthorizeFindById(
long id) {
return delegate.monoPostAuthorizeFindById(id);
}
代码示例来源:origin: spring-projects/spring-security
@Override
@PostAuthorize("@authz.check(authentication, returnObject)")
public Publisher<String> publisherPostAuthorizeBeanFindById(
long id) {
return delegate.publisherPostAuthorizeBeanFindById(id);
}
}
代码示例来源:origin: spring-projects/spring-security
@Override
@PostAuthorize("returnObject?.contains(authentication?.name)")
public Publisher<String> publisherPostAuthorizeFindById(
long id) {
return delegate.publisherPostAuthorizeFindById(id);
}
代码示例来源:origin: spring-projects/spring-security
@Override
@PostAuthorize("@authz.check(authentication, returnObject)")
public Mono<String> monoPostAuthorizeBeanFindById(
long id) {
return delegate.monoPostAuthorizeBeanFindById(id);
}
代码示例来源:origin: spring-projects/spring-security
@Override
@PostAuthorize("@authz.check(authentication, returnObject)")
public Flux<String> fluxPostAuthorizeBeanFindById(
long id) {
return delegate.fluxPostAuthorizeBeanFindById(id);
}
代码示例来源:origin: spring-projects/spring-security
@PostAuthorize("#o?.contains('grant')")
String postAnnotation(@P("o") String object);
}
代码示例来源:origin: spring-projects/spring-security
@PreAuthorize("someExpression")
@PreFilter(filterTarget = "param", value = "somePreFilterExpression")
@PostFilter("somePostFilterExpression")
@PostAuthorize("somePostAuthorizeExpression")
public List<?> doSomething(List<?> param) {
return param;
}
}
代码示例来源:origin: timebusker/spring-boot
@PreAuthorize("#id<10 and principal.username.equals(#username) and #user.username.equals('abc')")
@PostAuthorize("returnObject%2==0")
@RequestMapping("/grep")
public Integer test(Integer id, String username, UserEntity user) {
// ...
return id;
}
代码示例来源:origin: org.apache.rave/rave-core
/**
* Creates a new user page with the supplied pageName and pageLayoutCode
*
* @param pageName the name of the new page
* @param pageLayoutCode the page layout code
* @return the new Page object
*/
@PostAuthorize("hasPermission(returnObject, 'create')")
Page addNewUserPage(String pageName, String pageLayoutCode);
代码示例来源:origin: org.apache.rave/rave-core
/**
* Gets the RegionWidget with the specified ID.
*
* @param regionWidgetId The ID of the RegionWidget to fetch.
* @return The RegionWidget or null if not found.
*/
@PostAuthorize("hasPermission(returnObject, 'read')")
RegionWidget getRegionWidget(String regionWidgetId);
代码示例来源:origin: org.apache.rave/rave-core
/**
* Gets the detailed metadata for a widget
*
* @param id the Id of the widget
* @return a valid widget if one exists for the given id; null otherwise
*/
@PostAuthorize("returnObject == null or hasPermission(returnObject, 'read')")
Widget getWidget(String id);
代码示例来源:origin: org.apache.rave/rave-core
/**
* Persists a new {@link Widget} if it is not already present in the store
*
* @param widget new Widget to store
* @return Widget if it is new and can be stored
*/
@PostAuthorize("hasPermission(returnObject, 'create')")
Widget registerNewWidget(Widget widget);
代码示例来源:origin: org.apache.rave/rave-core
/**
* Creates a new Category object
* @param text the category text value
* @param createdUser the user creating this category
* @return a Category object representing the new entity
*/
@PostAuthorize("hasPermission(returnObject, 'create')")
Category create(String text, User createdUser);
代码示例来源:origin: org.apache.rave/rave-core
/**
* Gets the profile page for the given user.
*
* @deprecated method is deprecated in favor of getPages("profile", userId);
*
* @param userId The user to retrieve the page for.
* @return The profile page
*/
@Deprecated
@PostAuthorize("returnObject == null or hasPermission(returnObject, 'read')")
Page getPersonProfilePage(String userId);
代码示例来源:origin: org.genesys-pgr/application-blocks-security
@Override
@Transactional(readOnly = true)
@PostAuthorize("returnObject==null or hasRole('ADMINISTRATOR') or hasPermission(#returnObject.objectIdIdentity, #returnObject.aclClass.aclClass, 'READ')")
public AclObjectIdentity getObjectIdentity(final long id) {
return aclObjectIdentityPersistence.findOne(id);
}
代码示例来源:origin: dschadow/JavaSecurity
@PreAuthorize("hasRole('USER')")
@PostAuthorize("returnObject.username == principal.username")
Contact getContact(int contactId) {
return jdbcTemplate.queryForObject("SELECT * FROM contacts WHERE id = ?",
new Object[]{contactId}, (rs, rowNum) -> createContact(rs));
}
代码示例来源:origin: DigAg/digag-server
@ApiOperation(value="获取当前用户")
@PostAuthorize("hasRole('ROLE_USER')")
@RequestMapping(value = "/current",method = RequestMethod.GET)
public JsonResult<User> getCurrentUser(HttpServletRequest request) {
return userService.getCurrentUser(request);
}
}
代码示例来源:origin: pl.touk.widerest/widerest-api
@PostAuthorize("hasRole('PERMISSION_ALL_ORDER')")
@Transactional
public List<Order> getAllOrders() {
final CriteriaBuilder builder = this.em.getCriteriaBuilder();
final CriteriaQuery criteria = builder.createQuery(Order.class);
Root order = criteria.from(OrderImpl.class);
criteria.select(order);
TypedQuery query = this.em.createQuery(criteria);
query.setHint("org.hibernate.cacheable", Boolean.valueOf(true));
query.setHint("org.hibernate.cacheRegion", "query.Order");
return query.getResultList();
}
内容来源于网络,如有侵权,请联系作者删除!