role

Resource Based Access Control vs Role Based Access Control

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am learning Apache Shiro, and I found this article: The New RBAC: Resource-Based Access Control And the author said: .......you could assign behaviors (permissions) directly to a Role if you want. In this sense, you would still have a Role-Based Access Control security policy - it is just you would have an explicit RBAC policy instead of the traditional implicit strategy. But that begs the question - why stop at roles? You can assign behaviors directly to users, or to groups, or to anything else your security policy might allow. It seems

Roles vs Claims Authorization Asp.net web api-2 with WIF and OWIN Middleware

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to secure asp.net web-api 2.0 with Windows Identity Foundation 2. The choice I have to make is between role based authorization and claims based authorization. As a practice, I added a users in DbInitializer and assigned him two roles (Admin and Manager). When I log in with that user, I see that ClaimsPrincipal in debug mode, it already has those roles (Admin and Manager) associated as claims. So here are the questions: If roles are also treated as claims, what is the difference b/w roles and claims then? If I keep away from

How to deal with defaultRolePrefix=“ROLE_” in Spring Security update from 3.2.7 to 4.0.2.RELEASE

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My Spring Boot application works on Spring Security 3.2.7.RELEASE . Now, I'd like to update it to 4.0.2.RELEASE . After hours of debug I have found that Spring Security 4.0.2.RELEASE uses defaultRolePrefix="ROLE_" in org.springframework.security.access.expression.SecurityExpressionRoot.hasAnyAuthorityName(String prefix, String... roles) method In my application I use roles without this prefix and accordingly I get AccessDeniedException . How to configure Spring Boot in order to use SecurityExpressionRoot.defaultRolePrefix="" ? 回答1: I found

Your role instances have recycled a number of times during an update or upgrade operation

匿名 (未验证) 提交于 2019-12-03 08:35:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to deploy a Cloud Service with 1 Web Role to Azure. When I do so, I get this message: Your role instances have recycled a number of times during an update or upgrade operation. This indicates that the new version of your service or the configuration settings you provided when configuring the service prevent the role instances from running. Verify your code does not throw unhandled exceptions and that your configuration settings are correct and then start another update or upgrade operation. The project runs just fine locally, and

Why do Bootstrap tabs have role=“presentation”?

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm working on a design system that's extending from the Bootstrap framework. One of the key goals is accessibility. When implementing Bootstrap tabs I see that they apply role="presentation" to the list items in their nav list. So I put together a little chunk of test HTML from the Bootstrap template: <ul class="nav nav-tabs"> <li role="presentation" class="active"><a href="#">Home</a></li> <li role="presentation"><a href="#">Profile</a></li> <li role="presentation"><a href="#">Messages</a></li> </ul> <ul class="nav nav-tabs"> <li class=

show/hide some menus depend on the Sonata admin ROLE

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm working on a web project using Symfony2 , and i used Sonata Admin for the admin Panel , every thing works fine but what i want to do is ,on the dashboard menus of sonata Admin , i need to show hide some menus depend on the admin ROLE , so did any one do this before or know how to do it ? i tryed to use the config of the roles but when i'm connecting with a ROlE diffrent of ROLE_SONATA_ADMIN the top menu dont show up , - { path: ^/admin, role: [ROLE_ADMIN, ROLE_SONATA_ADMIN,ROLE_ADMIN_NEWS] } thanks 回答1: i found the solution for this i

Eager fetch does not seem to join

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using play 2.0.4 with Java. I'm trying to save and retrieve a value from the in-memory db that play provides (Ebean is the underlying JPA implementation). Here's some sample code: @NoobDisclaimer ( "I'm fairly new to Play and JPA" ) @Entity public class User extends Model { @Id public Long id ; public String name ; // Does not fetch eagerly. @ManyToOne ( fetch = FetchType . EAGER ) private Role role ; // Role extends Model { has id and name} public static Finder < Long , User > find = new Finder < Long , User >( Long . class ,

Repeated test descriptions with RSpec for every user role

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Creating some controller tests with RSpec, I find myself repeating several test cases for every possible user role. For example describe "GET 'index'" do context "for admin user" do login_user ( "admin" ) it "has the right title" do response . should have_selector ( "title" , : content => "the title" ) end end context "for regular user" do login_user ( "user" ) it "has the right title" do response . should have_selector ( "title" , : content => "the title" ) end end end This is a simple example just to make my point, but I have a

MongoDB 3.2 authentication failed

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I create a user with the following set of commands. This should create user in both admin db as well as my target db ( c2d ): # mongo 127.0.0.1:27017 MongoDB shell version: 3.2.6-29-g5c19788 connecting to: 127.0.0.1:27017/test > use admin switched to db admin > show collections system.users system.version > db.system.users.find() > db.createUser({user:"cd2", pwd:"cd2", roles:[{role:"dbOwner", db: "c2d"}]}) Successfully added user: { "user" : "cd2", "roles" : [ { "role" : "dbOwner", "db" : "c2d" } ] } > db.system.users.find() { "_id" : "admin

include bootstrap role attribute in rails form helper

旧巷老猫 提交于 2019-12-03 07:00:55
Twitter Bootstrap has this role attribute for forms: <form role="form"> How can I include the role attribute in Rails form helpers? I tried this, but it doesn't work: <%= form_for @user, class: "form-horizontal", role: "form" do |f| %> You need to specify it as an html option: <%= form_for @user, html: {class: "form-horizontal", role: "form"} do |f| %> form_for and form_tag have to be used differently: form_for: <%= form_for @user, html: { class: "form-horizontal", role: "form" } do |f| %> form_tag: <%= form_tag some_path, class: "form-horizontal", role: "form" do |f| %> 来源: https:/