usergroups

Managing users/roles/groups in FOSUserBundle

独自空忆成欢 提交于 2019-12-18 11:17:39
问题 I am developing a simple CRUD to manage users/roles/groups of the application in which I am working. To manage users I'm using FOSUserBundle . What I want to do can be accomplished in several ways: Assigning roles to groups and then assign users to these groups Assigning roles to users directly But I have no idea how. I knew that FOSUser BaseUser class already has a column roles and in the documentation of FOSUser explains how to establish a ManyToMany relationship between users and groups

XAMPP: How to make apache webserver owner of folder /htdocs

孤街浪徒 提交于 2019-12-13 01:29:14
问题 I am using XAMPP and apache as webserver. I have permission problems with a website of mine that requires write access to a temporary folder in the project folder /htdocs/myProject/tmp It think my problem is that my site runs on my localhost and I copied the project with my regular desktop user into the htdocs folder. Apache seems to lack write permissions. My question is now: How do I found out which user group apache belongs to in order to make that group owner of the folder? That should

Searching for a user and associated groups on LDAP in one search

余生颓废 提交于 2019-12-13 00:30:09
问题 New to LDAP. The way our LDAP is arranged is People and groups. The people have user information such as name, uid, and mail. The groups have group name and multiple member field which has value like cn=First Last,cn=people,dc=comic,dc=com, listing the People that are members of the group. Currently starting with userid and password, doing two searches: 1) Get user by searching on People base domain on uid=value. Then from the user get the first and last name. 2) Search on Groups base domain

SharePoint permissions for a specific group

☆樱花仙子☆ 提交于 2019-12-12 05:29:39
问题 I'm trying to establish whether a specific group has Read access to a particular site collection. I have been trying for a day and a half but feel as if I have found three halves of different solutions! The code fragments I have so far are: using (SPSite site = new SPSite(this.GenerateAbsoluteUri(moduleCode, academicYear))) { using (SPWeb web = site.OpenWeb()) { for (int i = web.SiteGroups.Count - 1; i >= 0; i--) { SPGroup group = web.SiteGroups[i]; if (Regex.IsMatch(group.Name,

Joomla 2.5: assign user to usergroup from front-end

瘦欲@ 提交于 2019-12-12 00:58:40
问题 I have statically defined user groups with statically defined access rights. And I want to be able to change the user group for given user from the front-end using some module. Reason: users can register by themselves, and automatically go to group "registered". After some time they can be promoted and moved to group "member". But I don't want to do this from back-end, bcs e.g. promotion can be done by any another already member. So I need this in front-end. I haven't found any mention about

php5 not being run as www-data

喜夏-厌秋 提交于 2019-12-11 09:55:19
问题 I have some files that I need php to service to a client. These files are owned by www-data as they should be, with permissions 644 . Access to these files is beig denied however, so I ran this little script: <?php echo shell_exec('whoami'); ?> which prints out daemon , thisis not the user that I want php running as. Where in the php or apache configuration files can I set it so that php is run as user www-data ? Edit: I've seen this link, but I do not want to set up aliases, and I believe

How to build a user/group/achievement database?

情到浓时终转凉″ 提交于 2019-12-11 08:24:22
问题 I'm working on a new web platform that has users, groups and those users can get achievements (each group has its own achievements) for doing specific tasks and these are the tables I have at the moment: Users Groups Group_users (used to store user's groups, since users can join more than one group) Achievements User_achievements (used to store user's achievements, since users can have more than one achievement) My question is, in the User_achievements table, should I store the user and group

Query PrincipalSearcher for containing multiple strings

佐手、 提交于 2019-12-10 23:52:35
问题 I want to be able to query the active directory give a list of all groups containing certain words like Users or Administrators below is what i've got so far PrincipalContext ctx = new PrincipalContext(ContextType.Domain); GroupPrincipal qbeGroup = new GroupPrincipal(ctx); qbeGroup.DisplayName = "Administrators"; qbeGroup.DisplayName = "Users"; PrincipalSearcher srch = new PrincipalSearcher(qbeGroup); return srch.FindAll().Select(g => g.Name).ToArray(); This code doesn't even seem to filter

Assign User-objects to a Group while editing Group-object in Django admin

送分小仙女□ 提交于 2019-12-10 04:21:41
问题 In the default Django admin view for user-object (edit user) one can edit the user's group memberships. What if I wanted this the other way around also? I.e. in the group editing page one could select the users that belong to the group being edited. As I see this, Django doesn't have a ManyToMany mapping from Group to User object which makes it impossible(?) to implement a ModelAdmin class for this particular case. If I could make an additional UsersOfGroup model class and use it in the

Two owners of the same PostgreSQL database

允我心安 提交于 2019-12-05 16:31:25
问题 Is it possible with Postgresql to create a database which has 2 users which act like owners to the database? I can create a group role and add both users to that group, and then make the group the owner of the database, but this requires both users to be have to manually set their role on every connection to make any tables they have created accessible to the other user. Is there any way to make the group be the default role for a user each time they log in or any other way to achieve the