FAQ Database Discussion Community


Ansible variable assigment

variables,increment,roles,ansible,ansible-playbook
I want to run a role 10 times in a playbook and only on the 5th run of that role, I want it to run the second shell cmd from within that role. How can I address that ? Playbook: - name: bla bla hosts: ALL remote_user: root vars: some_variable:...

Can't RedirectToAction(“RedirectToDefault”) in MVC 5

c#,asp.net,model-view-controller,login,roles
I'm following this tutorial using MVC 5. But I cannot return RedirectToAction("RedirectToDefault"); it just stays at form login, and whether true or false password not happened public ActionResult RedirectToDefault() { String[] roles = Roles.GetRolesForUser(); if (roles.Contains("Administrator")) { return RedirectToAction("Index", "Admin"); } else if (roles.Contains("Dealer")) { return RedirectToAction("Index", "Dealer"); } else...

Devise and Rolify - Display all of users - roles — Multiple Roles

devise,user,roles,rolify
I have a view that shows the user and roles. I can get it to show all of the users and a single role with user.roles.first.name. I cant get it to loop and retrieve all roles for the user selected. Any help would be wonderful. <h1>Admin#users</h1> <p>Find me in app/views/admin/users.html.erb</p>...

Trouble editing the role

c#,asp.net-mvc,razor,roles
I am having a problem in editing the role of a user. I have these codes: ` Entities db2 = new Entities(); private UsersContext db = new UsersContext(); // // POST: /AdminOnly/Edit/5 [Authorize(Roles = "Owner")] [HttpPost] [ValidateAntiForgeryToken] public ActionResult Edit(UserProfile userprofile, int? roless) { if (ModelState.IsValid) { webpages_UsersInRoles s =...

Change role of one user no working with Symfony2

symfony2,fosuserbundle,roles
Sorry if this question has been asked many times but I didn't found any solution on the Web. So, I just have installed FOSUserBundle and I've created 2 users on my application with the console. The problem is they don't have any role. So in on controller, I get the...

How to set an Ansible role's variables file relative to the host?

variables,roles,ansible,playbook
Here is the detail of my playbook: Playbook tree ├─ devops | ├─ roles | | ├─ mongodb | | ├─ haproxy | | ├─ monit | | | ├─ vars | | | | └─ main.yml | | | └─ ... | | └─ ... | ├─ hosts |...

Implementing roles & permissions in Laravel 5 (with github/romanbican/roles)

laravel,permissions,roles,laravel-5
I'm wanting to use a pre existing package, probably This one, but I'm open to others. My question is, when exactly would I create the roles? Because they're going to get saved to the database, I don't want it to run every time it initializes or anything like that, so...

Correct way to manage routes after sign in for different roles

meteor,roles,iron-router
I have 2 roles, admins and users. I have a home route '/' that is just a sign in page. When admin users sign in they must go to one route ('adminPortal') and when user users log in they must go to the 'userPortal' route. On signing out both roles...

How to change group permissions in sharepoint 2013 using C#

c#,sharepoint,permissions,roles,groups
I have a group "Visitors" with Contribute permission and I want to change permission to Read, programmatically. I don't have problem with adding new permission to the group, but I don't know how to remove old permission. How to change this code to remove permission Contribute and add permission Read?...

Protect admin with roles

symfony2,roles,access-control
I want only users have ADMIN or ENSEIGNANT roles can access to the admin part but still I get Access Denied even when I authenticate as ENSEIGNANT role_hierarchy: ROLE_ADMIN: [ROLE_ENSEIGNANT] ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] //........... access_control: - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }...

Deleting roles in asp.net mvc 5

c#,asp.net,database,asp.net-mvc-5,roles
I am trying to delete a Role from my database but it doesn't work , when I click the delete button, the system crashed and the error's message show me this : It can't find the resource. Description: HTTP 404. The resource you are looking for (or one of its...

Symfony 2 - Adding user roles under the ROLE_USER

symfony2,fosuserbundle,roles
I'm trying to create a new role in Symfony 2 below the default USER_ROLE (that role would have limited write access to some features). I am using FOSUserBundle. I've written the following security settings so far but my ROLE_DEMO users still get the ROLE_USER. role_hierarchy: ROLE_DEMO: [] ROLE_USER: [ROLE_DEMO] ROLE_ADMIN:...

Custom role provider with Claims

asp.net,model-view-controller,roles,claims
I have User table in my database where i keep user's role (master admin, admin, developer). i want to authorize some controllers so only master admin can have access. namespace TicketSystem.Controllers { public class UserCredentials : ClaimsPrincipal, IIdentity, IPrincipal { public IIdentity Identity { get; private set; } public int...

Meteor.users.find() - how to filter by group in alanning:roles package

meteor,mongodb-query,roles,groups
I'm trying to make an admin section on my website. The admin can go to the admin page and see a table of the users in his group. I only want to publish a the users that are in that admin's group. E.g. he is in the group ['soccer'] but...

Roles class asp.net mvc?

roles,asp.net-roles
where the Roles class store the roles that he creates, what is the type of role providers that support this class? is it SqlRoleProvider?...

Submit results for different rows

php,wordpress,foreach,roles
I have a problem here guys and I need your suggestions. The thing is that I created a code for a wordpress website in which a administrator is able to change roles of user from a page not the administrator dashboard. Now I have created the code and I am...

User.IsInRole return false

asp.net-mvc,asp.net-identity,roles
I 'm using Identity 2 for authentication in mvc 5 web site. In my view i want check the role of the user : @if(User.IsInRole("Customers")) { @*do something*@ } but this always return false, I have already set <roleManager enabled="true" /> in the web config. any help please....

How to manage Roles in Couchbase?

error-handling,passport.js,roles,couchbase,couchbase-sync-gateway
I have a Couchbase backend hosted in a remote server and I want to update my sync function in order to grant data access to users. The users are generated by Passport.js, and my trouble is to perform basic CRUD operations on roles. The official documentation says that the RESTful...

PostgreSQL error Fatal: role “username” does not exist

postgresql,windows-7,windows-7-x64,roles
I'm setting up my PostgreSQL 9.1 in windows. I can't do anything with PostgreSQL: can't createdb, can't createuser; all operations return the error message Fatal: role root does not exist root is my account name, which I created while installing Postgresql But I am able to connect using: username :...

Can't assign roles from azure AD app manifest

azure,active-directory,manifest,roles
I was trying to implement role based authorization in my azure application as described in the http://www.dushyantgill.com/blog/2014/12/10/roles-based-access-control-in-cloud-applications-using-azure-ad/ article. Unfortunately, after I upload the manifest with the roles I can't assign the roles to the users - the assign button at the bottom of azure management portal is disabled (in the...

Cannot redirect role's view

c#,asp.net-mvc,roles
I have these codes here for the Login POST and GET [Authorize] public class AccountController : Controller { // // GET: /Account/Login [AllowAnonymous] public ActionResult Login(string returnUrl) { ViewBag.ReturnUrl = returnUrl; return View(); } // // POST: /Account/Login [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult Login(LoginModel model, string returnUrl) { if (ModelState.IsValid...

Liferay roles and permissions for publishing

permissions,liferay-6,roles
I am new to Liferay, since there are many roles in Liferay, i'm in confusion. I need to implement a particular scenario like, Admin --> can publish Users(under admin) --> can edit content and make request to admin for publishing can any one explain how to implement this...

Add users roles in Meanjs

roles,mean,mean-stack,meanjs
Recently I began to use MeanJs, it's pretty amazing but I don't understand some stuff. I need to create a simple user management for my backend. From official blog they say: New usability features: Added roles to the User model - the defaults are ‘user’ and ‘admin’, you can add...

Asp.net LoginView Rolegroups don't show elements

asp.net,webforms,roles,user-roles,loginview
I'm using rolegroups at my Site.Master masterpage with Web Forms template. When I log in with some admin user, the first page shows the admin role content fine, but when I refresh the page or goes to other page, the elements in Rolegroups disappear. Only the LoggedInTemplate are showed. Someone...

Stop users from navigating to a page that is restricted to their role

meteor,roles,iron-router
I want to restrict access to certain pages depending on users roles. So I don't want a logged in user to be able to just change the URL in their browser to navigate to a page they shouldn't have access to. So for such a route I'm doing something like:...