search for: user_group

Displaying 20 results from an estimated 22 matches for "user_group".

Did you mean: user_groups
2006 Apr 17
3
model.models.models or model.models.find(:first).models
...-> Permissions class UserGroup < ActiveRecord::Base has_and_belongs_to_many :users, :join_table => "user_usergroup_join" has_and_belongs_to_many :permissions, :join_table => "usergroup_permission_join", :uniq => true end I can do this: permissions = user.user_groups.find(:first).permissions but not: permissions = user.user_groups.permissions I want to get all the user permissions, do I have to loop though each user group and add the permission from each one by one? Many thanks in advance! -- Posted via http://www.ruby-forum.com/.
2003 Oct 02
0
3.0.0-2 on RH9 as domain member of win2k domain - not able to write to shares...
Hi, I'm unable to write to shares on the RH9 box from win2k clients. Have successfully joined domain with 'net join ads' getent passwd lists local unix users and win2k domain users successfully I've mapped a DOMAIN+user_group to unix user_group, which 'net groupmap list' shows successfully I have tried various ways to give DOMAIN+user.name access to the share, by changing the 'valid users =' line to inlcude: DOMAIN+user_group, user_group, DOMAIN+user.name Can browse successfully to share, but not able to...
2004 Feb 20
1
NGROUPS_MAX on Linux
...rieving revision 1.42 diff -u -u -r1.42 uidswap.c --- uidswap.c 17 Dec 2003 07:53:26 -0000 1.42 +++ uidswap.c 19 Feb 2004 23:50:38 -0000 @@ -38,7 +38,7 @@ /* Saved effective uid. */ static int privileged = 0; static int temporarily_use_uid_effective = 0; -static gid_t saved_egroups[NGROUPS_MAX], user_groups[NGROUPS_MAX]; +static gid_t *saved_egroups, *user_groups; static int saved_egroupslen = -1, user_groupslen = -1; /* @@ -68,17 +68,27 @@ privileged = 1; temporarily_use_uid_effective = 1; - saved_egroupslen = getgroups(NGROUPS_MAX, saved_egroups); + + saved_egroupslen = getgroups(0, NULL)...
2008 Jun 06
2
joining tables
Hi I have 3 tables as 1) user_groups id | contact_id | group_id | group_user_type_id 2) contact id | name_first | name_last | 3)contact_email_addresses contact_id | contact_email_address_type_id | emailaddress Now I have group_id sa for example 68 What I want is from contact_email_addresses table get all the emaila...
2009 Nov 16
0
mysql_adapter.rb:576: [BUG] Segmentation fault
...ils 2.3.2 application starting on http://0.0.0.0:3333 .. Ruote workflow/BPM engine started (ruote_plugin) .. found C:/Users/Alex/Documents/IT/ruote-web2/lib/ruote.rb => Call with -d to detach => Ctrl-C to shutdown server ..... Group Load (0.0ms) SELECT `groups`.* FROM `groups` INNER JOIN `user_groups` ON `groups`.id = `user_groups`.group_id WHERE ((`user_groups`.user_id = 1)) Group Columns (2.0ms) SHOW FIELDS FROM `groups` Completed in 66ms (View: 32, DB: 5) | 200 OK [http://localhost/ processes] C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ connection_a dapters/mysq...
2006 Jul 26
3
Polymorphic Association with Single Table Inheritance?
...mbership belongs_to :groupable, :polymorphic => true belongs_to :group, :polymorphic => true Group (table with ''type'' column) has_many :memberships, :as => :group has_many :groupables, :through => :memberships And the inherited tables: User < Groupable has_many :user_groups, :through => :memberships UserGroup < Group has_many :users, :through => :memberships Setting up an user, a membership and an user_group works, but it throws an exception on accessing user_group.users: >> ruby script/console >> u = User.create >> m = Membership.crea...
2015 Jun 20
3
[PATCH] Fix potential use after free in uidswap.c (portable)
...y rather unlikely) use after free bug in function temporarily_use_uid(), file uidswap.c. --- a/uidswap.c +++ b/uidswap.c @@ -113,8 +113,9 @@ temporarily_use_uid(struct passwd *pw) } } /* Set the effective uid to the given (unprivileged) uid. */ - if (setgroups(user_groupslen, user_groups) < 0) - fatal("setgroups: %.100s", strerror(errno)); + if (user_groupslen > 0 && + (setgroups(user_groupslen, user_groups)) < 0) + fatal("setgroups: %.100s", strerror(errno)); Best regards, Albert
2020 Jun 05
3
It seems to have bug for @group to set in valid or invalid conf
...nvalid conf (?). And i can't find fixed patch in later release. I describe this issue detail below: 1. Firstly, there is my samba conf below (Add @d_group in "invalid users"): (smb_share.conf) [f1] path = /home/f1 write list = "admin" "@Administrator_Group" "@User_Group" "root" invalid users = "guest" "@d_group" valid users = "admin" "@Administrator_Group" "@User_Group" "root" browsable = Yes public = Yes force directory mode = 0777 directory mode = 0777 force create mode = 0777 create mask...
2002 Sep 25
1
NGROUPS_MAX
...dary groups a compile-time decision. $ find . -name \*.c | xargs grep NGROUPS_MAX ./groupaccess.c:static char *groups_byname[NGROUPS_MAX + 1]; /* +1 for base/primary group */ ./groupaccess.c: gid_t groups_bygid[NGROUPS_MAX + 1]; ./uidswap.c:static gid_t saved_egroups[NGROUPS_MAX], user_groups[NGROUPS_MAX]; ./uidswap.c: saved_egroupslen = getgroups(NGROUPS_MAX, saved_egroups); ./uidswap.c: user_groupslen = getgroups(NGROUPS_MAX, user_groups); POSIX defined sysconf in order to avoid this. By using sysconf(_SC_NGROUPS_MAX) this value is determined at run-time. Sven
2007 Dec 28
1
validation of acts_as_list in the model of the base class?
Lets say I have 3 models, user, user_group and user_group_nodes. A normal user has one user_group_id as a foreign key and a special user has multiple user_groups which are defined in the user_group_nodes. The user_group_nodes is a "acts_as_list" for user and contains a list of group_ids. When I build a form to get user input an...
2010 Jun 11
0
nested form & habtm
so i am trying to save to a join table in a habtm relationship, but i am having problems. from my view, i pass in a group id with: = link_to "Create New User", new_user_url(:group => 1) User model (user.rb) class User < ActiveRecord::Base has_and_belongs_to_many :user_groups accepts_nested_attributes_for :user_groups end UserGroups model (user_groups.rb) class UserGroup < ActiveRecord::Base has_and_belongs_to_many :users end users_controller.rb def new @user = User.new(:user_group_ids => params[:group]) end in the new user view, i have access to the Use...
2010 May 16
3
searchlogic
Hey The guys at the searchlogic google groups seem to be asleep -.- They didnt'' grant me permission to post yet. But anyways, right now, I followed the searchlogic tutorial found here -http://www.binarylogic.com/2008/09/07/tutorial-pagination-ordering- and-searching-with-searchlogic/ however, in that tutorial, the results of the find displays all my items, before i even search for
2001 Apr 25
0
NeXT // Broken _POSIX_SAVED_ID patch
...+/* Saved effective uid. */ +static uid_t saved_euid = 0; +static gid_t saved_egid = 0; +#endif + /* Saved effective uid. */ static int privileged = 0; static int temporarily_use_uid_effective = 0; -static uid_t saved_euid = 0; -static gid_t saved_egid; static gid_t saved_egroups[NGROUPS_MAX], user_groups[NGROUPS_MAX]; static int saved_egroupslen = -1, user_groupslen = -1; - + /* * Temporarily changes to the given uid. If the effective user * id is not root, this does nothing. This call cannot be nested. @@ -44,42 +48,57 @@ void temporarily_use_uid(struct passwd *pw) { - /* Save the cur...
2013 May 07
0
Some potential bugs in Openssh-6.2p1
...ftp.c function: parse_args At line 1143: for (i = 0; cmds[i].c != NULL; i++) { Could this loop breaks when cmds[i].c is null? if so At line 1148: cmd = cmds[i].c; cmd is null, which is passed to strlen at line 1237. 5. Use after free file: uidswap.c function: temporarily_use_uid At line 113: xfree(user_groups); user_groups is freed and is used at line 117: if (setgroups(user_groupslen, user_groups) < 0) as a function argument. 6. Use After free file: monitor.c function: At line 1219: debug3("%s: key %p is %s", __func__, key, allowed ? "allowed" : "not allowed"); in whi...
2007 Sep 20
1
Relationship Proxies?
...9;'aaron'' => #<User:0xb7109cdc @attributes={"salt"=>"7e3041ebc2fc05a40c60028e2c4901a81035d3cd", "updated_at"=>nil, "contact_info_id"=>nil, "crypted_password"=>"00742970dc9e6319f8019fd54864d3ea740f04b1", "user_group_id"=>"10", "remember_token_expires_at"=>nil, "id"=>"2", "disabled"=>"0", "remember_token"=>nil, "locale"=>nil, "login"=>"aaron", "created_at"=>"2007-09-18...
2020 Jun 13
0
It seems to have bug for @group to set in valid or invalid conf
...ind fixed patch in later release. I > describe this issue detail below: > > 1. Firstly, there is my samba conf below (Add @d_group in "invalid users"): > (smb_share.conf) > [f1] > path = /home/f1 > write list = "admin" "@Administrator_Group" "@User_Group" "root" > invalid users = "guest" "@d_group" > valid users = "admin" "@Administrator_Group" "@User_Group" "root" > browsable = Yes > public = Yes > force directory mode = 0777 > directory mode = 0777 > f...
2002 Jun 07
4
openssh for UWIN
...ed(HAVE_CYGWIN) && !defined(_UWIN) /* * Push the appropriate streams modules, as described in Solaris pts(7). * HP-UX pts(7) doesn't have ttcompat module. *** uidswap.c.orig Thu Dec 20 22:45:52 2001 --- uidswap.c Thu May 30 16:36:30 2002 *************** *** 80,86 **** if (user_groupslen < 0) fatal("getgroups: %.100s", strerror(errno)); } ! #ifndef HAVE_CYGWIN /* Set the effective uid to the given (unprivileged) uid. */ if (setgroups(user_groupslen, user_groups) < 0) fatal("setgroups: %.100s", strerror(errno)); --- 80,86 ---- if (...
2009 Mar 04
10
total per user
so I am trying to sum month over month the amount that a user has posted. So for example: User 1: Jan $3000 Feb $4000 March $1500, etc. I can get this to work if I sum totals (aggregate of all users) but just not by user. Here is my code in the controller: def index @users = User.find :all, :order => ''name ASC'' @deal_groups = Deal.find(:all).group_by {|t|
2001 Oct 08
1
Ported OpenSSH 2.9.9p2 to Dynix
...+ + MANTYPE=cat + ;; *-*-sysv4.2*) CPPFLAGS="$CPPFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" *** uidswap.c Thu Apr 26 15:10:15 2001 --- uidswap.c.new Mon Oct 8 11:33:42 2001 *************** *** 85,91 **** if (setgroups(user_groupslen, user_groups) < 0) fatal("setgroups: %.100s", strerror(errno)); #endif /* !HAVE_CYWIN */ ! #ifndef SAVED_IDS_WORK_WITH_SETEUID /* Propagate the privileged gid to all of our gids. */ if (setgid(getegid()) < 0) debug("setgid %...
2006 Feb 20
0
Securing the Model
...... the change looks like (my code has some error checking not shown and handles the case where no user is logged in) args[1][:conditions][0] = args[1][:conditions][0].to_s + " AND ( readable_by = ''a'' OR (readable_by = ''g'' AND rgroup_id IN (#{session [:user_groups]})) OR user_id = ''#{user_id}'') " # ... self.find(*args) end def writable?(session) ... return true or false depending on session and attributes end end end