user-roles

Keycloak User Roles missing in REST API

你。 提交于 2019-12-07 16:38:06
问题 I would like to ask, if somebody knows, why there are no roles within the user details in REST ADMIN API request. I saw some posts dealing with this topic, but there were either no clear answer or they propose to use keycloak-admin-client, but that seems not very convenient. Maybe I need to map the roles in Admin console or use claims? Roles are one of the most important user attribute so whats the reason they are not retrieved as other user attributes?Any suggestion? Thanks GET /auth/admin

ASP.net Identity 2.1 Get all users with roles

℡╲_俬逩灬. 提交于 2019-12-07 04:44:57
问题 How can I get a list of users including the role name per user? My app has the default tables of an MVC Project. I'm able to retrieve all users using Identity 2.1 like this: Model public class GetVendorViewModel { public IList<ApplicationUser> Vendors { get; set; } } Controller public ActionResult Index() { var manager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext())); var roleStore = new RoleStore<IdentityRole>(ac); var roleManager = new

Can't map roles to groups using ibm-application-bnd.xml

戏子无情 提交于 2019-12-07 03:40:14
问题 I'm trying to map user groups using ibm-application-bnd.xml. Put it into META-INF folder. On try to access secure page get next message: [08.05.15 17:42:21:242 MSK] 00000084 WebCollaborat A SECJ0129E: ... GET в null:/loginmodule/date/, Authorization failed, Not granted any of the required roles: user-role When I try configure it with ibm console it works. All configuration WAS writes into ibm-application-bnd.xmi instead of ibm-application-bnd.xml. What do I wrong? Using Websphere AS 8.5.5

User roles schema on Django

こ雲淡風輕ζ 提交于 2019-12-07 03:09:34
问题 A great greetings community My question is related with the kind of manage users and the schema users in Django, In beginning I ask to you apologize just in case that my questions can will be too "newbies" or without sense, I am starting to related me with the Django Users schemas and their different possibilities of work in the projects. I have the following situation. I am building an application in which I will have three differents user types: Medical Patient Physiotherapist I am using

Replace product image by a placeholder based on user roles in WooCommerce

霸气de小男生 提交于 2019-12-06 16:00:18
In WooCommerce I am using user roles to define what each user role can see. If the user is "customer" or "administrator", he is able to see the product image, otherwise he see WooCommerce default placeholder image. For that I use the code below: function woocommerce_product_get_image_id_callback( $value ) { global $current_user; if ( in_array( 'customer', (array) $current_user->roles )|| in_array( 'administrator', (array) $current_user->roles )) { return $value; } else { return false; } } add_filter( 'woocommerce_product_get_image_id', 'woocommerce_product_get_image_id_callback', 10, 1 ); It

Parse.com, Adding users to created roles

谁说胖子不能爱 提交于 2019-12-06 14:03:07
I have a cloud code which creates two account roles when a user signs up. Below is the method Parse.Cloud.afterSave("account", function(request) { var accountName = request.object.get("name"); //create admin role var adminRoleACL = new Parse.ACL(); adminRoleACL.setPublicWriteAccess(true); var adminRole = new Parse.Role(accountName + "_Administrator", adminRoleACL); adminRole.save() ; //create user role var userRoleACL = new Parse.ACL(); userRoleACL.setPublicWriteAccess(true); var userRole = new Parse.Role(accountName + "_User", userRoleACL); userRole.save(); }); Now what i wanted to achieve

Set a minimal order amount for a specific User role in Woocommerce

你。 提交于 2019-12-06 09:14:09
问题 I'm creating a wholesale website. Looking on here I was able to already find code for switching between two user roles after customers place a first order. Now I just need to be able to set minimum order amounts for different user roles on the cart/checkout page and most of what I've been finding does way more than I need it to. Searching online I was able to find this bit of code: <?php /* Author: Doug Edgington Description: Require a minimum order total in Woocommerce for a user role */

Grails check role access for specific controller action

守給你的承諾、 提交于 2019-12-06 05:56:12
问题 I need to display/hide action buttons depending if the user can access (by role definition) the specific controller/action. I'm using Spring Security plugin. My goal is to used the annotation @Secured("ROLE_...") for every method of each of my controller and I'm looking for a way to check, before calling the action, if the user has access to this specific action. I'm guessing there is way to check this because the annotation brings the information but I cannot find any solution. In this

Keycloak User Roles missing in REST API

耗尽温柔 提交于 2019-12-06 00:58:29
I would like to ask, if somebody knows, why there are no roles within the user details in REST ADMIN API request. I saw some posts dealing with this topic, but there were either no clear answer or they propose to use keycloak-admin-client, but that seems not very convenient. Maybe I need to map the roles in Admin console or use claims? Roles are one of the most important user attribute so whats the reason they are not retrieved as other user attributes?Any suggestion? Thanks GET /auth/admin/realms/{realm}/users { "id": "efa7e6c0-139f-44d8-baa8-10822ed2a9c1", "createdTimestamp": 1516707328588,

set role for users in edit form of sonata admin

淺唱寂寞╮ 提交于 2019-12-05 18:50:31
I'm using Symfony 2.1 for a project. I use the FOSUserBundle for managing users & SonataAdminBundle for administration usage. I have some questions about that: As an admin, I want to set roles from users in users edit form. How can I have access to roles in role_hierarchy ? And how can I use them as choice fields so the admin can set roles to users? When I show roles in a list, it is shown as string like this: [0 => ROLE_SUPER_ADMIN] [1 => ROLE_USER] How can I change it to this? ROLE_SUPER_ADMIN, ROLE_USER I mean, having just the value of the array. Romain Bruckert Based on the answer of