freemarker 整合 sitemesh 裝飾html頁面 shiro 標籤

來源:互聯網
上載者:User

標籤:返回   eem   帳號   guest   dmi   order   site   free   cat   

   guest標籤:驗證目前使用者是否為“訪客”,即未認證(包含未記住)的使用者;  shiro標籤:<shiro:guest></shiro:guest>  ;  freemark中: <@shiro.guest>  </@shiro.guest>     user標籤:認證通過或已記住的使用者  shiro標籤:<shiro:user> </shiro:user>  ;freemark中: <@shiro.user> </@shiro.user>      authenticated標籤:已認證通過的使用者。不包含已記住的使用者,這是與user標籤的區別所在。   shiro標籤:<shiro:authenticated> </shiro:authenticated>;freemark中: <@shiro.authenticated></@shiro.authenticated>     notAuthenticated標籤:未認證通過的使用者。與authenticated標籤相對。shiro標籤:<shiro:notAuthenticated> </shiro:notAuthenticated>;freemark中: <@shiro.notAuthenticated></@shiro.notAuthenticated>     principal標籤:輸出目前使用者資訊,通常為登入帳號資訊  shiro標籤:Hello,  <@shiro.principal property="name" />  ;freemarker中:  Hello,  <@shiro.principal property="name" />, how are you today?          hasRole標籤:驗證目前使用者是否屬於該角色 ,shiro標籤: <shiro:hasRole name="administrator">  Administer the system </shiro:hasRole> ;freemarker中:<@shiro.hasRole name=”admin”>Hello admin!</@shiro.hasRole>      hasAnyRoles標籤:驗證目前使用者是否屬於這些角色中的任何一個,角色之間逗號分隔 ,shiro標籤: <shiro:hasAnyRoles name="admin,user,operator">  Administer the system </shiro:hasAnyRoles> ;freemarker中:<@shiro.hasAnyRoles name="admin,user,operator">Hello admin!</@shiro.hasAnyRoles>     hasPermission標籤:驗證目前使用者是否擁有該許可權 ,shiro標籤: <shiro:hasPermission name="/order:*">  訂單 </shiro:hasPermission> ;freemarker中:<@shiro.hasPermission name="/order:*">訂單/@shiro.hasPermission>      lacksRole標籤:驗證目前使用者不屬於該角色,與hasRole標籤想反,shiro標籤: <shiro:hasRole name="admin">  Administer the system </shiro:hasRole> ;freemarker中:<@shiro.hasRole name="admin">Hello admin!</@shiro.hasRole>      lacksPermission標籤:驗證目前使用者不擁有某種許可權,與hasPermission標籤是相對的,shiro標籤: <shiro:lacksPermission name="/order:*"> trade </shiro:lacksPermission> ;freemarker中:<@shiro.lacksPermission name="/order:*">trade</@shiro.lacksPermission>      注意:若freemarker使用了裝飾器模板:如:sitemesh 對返回頁面進行裝飾,這些標籤只能用在返回頁面中,而不能用在裝飾頁面上。

freemarker 整合 sitemesh 裝飾html頁面 shiro 標籤

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.