States, transitions, and entire flows can be secured in Spring Web Flow by using the <secured> element as a child of those elements. For example, to secure access to a view state, you might use <secured> like this:

 <view-state id="restricted">
<secured attributes="ROLE_ADMIN" match="all"/>
</view-state>

As configured here, access to the view state will be restricted to only users who are granted ROLE_ADMIN access (per the attributes attribute). The attributes attribute takes a comma-separated list of authorities that the user must have to gain access to the state, transition, or flow. The match attribute can be set to either any or all . If it’s set to any , then the user must be granted at least one of the authorities listed in attributes . If it’s set to all , then the user must have been granted all the authorities.You may be wondering how a user is granted the authorities checked for by the <secured> element.

SPRING IN ACTION 第4版笔记-第八章Advanced Spring MVC-007-给flowl加权限控制<secured>的更多相关文章

  1. SPRING IN ACTION 第4版笔记-第八章Advanced Spring MVC-004-Pizza例子的用户流程(flowExecutionKey、_eventId_phoneEntered、flowExecutionUrl )

    一. 1. 2. 3.customer-flow.xml 自己定义customer,最后output <?xml version="1.0" encoding="U ...

  2. SPRING IN ACTION 第4版笔记-第八章Advanced Spring MVC-003-Pizza例子的基本流程

    一. 1. 2.pizza-flow.xml <?xml version="1.0" encoding="UTF-8"?> <flow xml ...

  3. SPRING IN ACTION 第4版笔记-第八章Advanced Spring MVC-002-SpringFlow的组件(state\<transition>\<var>\<set>\<evaluate>)

    一. In Spring Web Flow, a flow is defined by three primary elements: states, transitions,and flow dat ...

  4. SPRING IN ACTION 第4版笔记-第八章Advanced Spring MVC-001- 配置SpringFlow(flow-executor、flow-registry、FlowHandlerMapping、FlowHandlerAdapter)

    一. 1.Wiring a flow executor <flow:flow-executor id="flowExecutor" /> Although the fl ...

  5. SPRING IN ACTION 第4版笔记-第八章Advanced Spring MVC-006-Pizza例子的支付流程

    一. 1. 2.payment-flow.xml <?xml version="1.0" encoding="UTF-8"?> <flow x ...

  6. SPRING IN ACTION 第4版笔记-第八章Advanced Spring MVC-005-Pizza例子的订单流程()

    一. 1.订单流程定义文件order-flow.xml <?xml version="1.0" encoding="UTF-8"?> <flo ...

  7. SPRING IN ACTION 第4版笔记-第十一章Persisting data with object-relational mapping-006Spring-Data的运行规则(@EnableJpaRepositories、<jpa:repositories>)

    一.JpaRepository 1.要使Spring自动生成实现类的步骤 (1)配置文件xml <?xml version="1.0" encoding="UTF- ...

  8. SPRING IN ACTION 第4版笔记-第十章Hitting the database with spring and jdbc-003-四种方式获取DataSource

    一.概述 1.Spring offers several options for configuring data-source beans in your Spring application, i ...

  9. SPRING IN ACTION 第4版笔记-第十章Hitting the database with spring and jdbc-001-Spring对原始JDBC的封装

    1.spring扩展的jdbc异常 2.Template的运行机制 Spring separates the fixed and variable parts of the data-access p ...

随机推荐

  1. 深入探析koa之中间件流程控制篇

    koa被认为是第二代web后端开发框架,相比于前代express而言,其最大的特色无疑就是解决了回调金字塔的问题,让异步的写法更加的简洁.在使用koa的过程中,其实一直比较好奇koa内部的实现机理.最 ...

  2. [GeekBand] 面向对象的设计模式(C++)(1)

    一个模式描述了一个在我们周围不断重复发生的问题,以及该问题的解决方案的核心. 这样,你就能一次又一次 地使用该方案而不必做重复劳动. 0. 从面向对象谈起 底层思维与抽象思维: 底层思维要求程序员&q ...

  3. jquery实现抽奖转盘

    用jquery通过配置参数实现抽奖转盘 1.html代码 <!DOCTYPE html> <html lang="zh-CN"> <head> ...

  4. Apple MDM Supported configurable settings

    导读:可以通过MDM实现的配置:Apple MDM Supported configurable settings 一.Accounts(账户信息) 1.Exchange ActiveSync(交换a ...

  5. 探索 Java 同步机制[Monitor Object 并发模式在 Java 同步机制中的实现]

    探索 Java 同步机制[Monitor Object 并发模式在 Java 同步机制中的实现] https://www.ibm.com/developerworks/cn/java/j-lo-syn ...

  6. MFC的规则DLL与扩展DLL

    一.MFC规则DLL     MFC规则DLL可以在该dll内部使用MFC,但是与应用程序的接口不能是MFC的.能够被所有支持dll的编程语言所写的应用程序使用,当然也包括使用MFC创建的应用程序.在 ...

  7. js给数字加三位一逗号间隔的两种方法(面试题)

    方法一:   <script type= "text/javascript"> //保留三位小数,toLocaleString() 方法可把一个 Number 对象转换 ...

  8. 排序,求几个最值问题,输入n个整数,输出其中最小的k个元素。

    看完两个求最大值算法之后的一些感想. 如果想直接看算法的可以跳过.但是我觉得我这些想法还是比较有用的,至少对我将来的算法设计是这样的. 算法的功能越强大,必然意味着速度慢,因为根据丛林法则,那种慢又功 ...

  9. 粗谈Android中的对齐

    在谈这个之前先啰嗦几个概念. 基线:书写英语单词时为了规范书写会设有四条线,从上至下第三条就是基线.基线对齐主要是为了两个控件中显示的英文单词的基线对齐,如下所示: Start:在看API的时候经常会 ...

  10. Delphi摄像头操作

    /*Title:Delphi摄像头操作 *Author:Insun *Blog:http://yxmhero1989.blog.163.com *From:www.4safer.com */ 为了笔耕 ...