Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: SecuritySuite settings - inherit from parent

  1. #1
    kir
    kir is offline Sugar Community Member
    Join Date
    Nov 2011
    Posts
    702

    Default SecuritySuite settings - inherit from parent

    hi

    i'm trying to set SecuritySuite options to target next
    I want to user can see only some accounts and all related information to them - Contacts, activites and history (Calls, Notes..), Opportunities, few more custom modules related to accounts.

    mean one of the user login to sugar as freelancer and work with some accounts. Managers of these accounts continue work with the same accounts as normal

    what settings i have to use for SecuritySuite to achieve this?

    Now i have to set all records in all related modules to freelancer group. And this is not acceptable.

    thanks in advance!

    Sugar 6.3.2 CE
    SecuritySuite premium

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,858

    Default Re: SecuritySuite settings - inherit from parent

    For an existing system with data already in place you may need to do some data work to set it all up if you want to avoid manually setting the groups. The key table is securitygroups_records. Check out an existing row and replicate how the data is being stored in there.

    Going forward, once you have inheritance set to "Inherit from Parent" the appropriate groups will be associated to any records created that are related to that parent.
    [SIGPIC][/SIGPIC]

    Using CE and have 2 or more users? You need SecuritySuite - Teams

  3. #3
    kir
    kir is offline Sugar Community Member
    Join Date
    Nov 2011
    Posts
    702

    Default Re: SecuritySuite settings - inherit from parent

    thanks, Jason!

    Does it mean that i will have to do assigning of all tree of records related to account every time i assign new account to the freelancer?
    And how it will work if i want to un-assign account with all related? - again manually unset group for all related records?

    Thanks in advance!

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,858

    Default Re: SecuritySuite settings - inherit from parent

    Are you using groups in place of users? This generally doesn't happen very often for normal group/team usage. Not sure why you would need to be assigning groups and unassigning groups on a regular basis. For unique cases like these some have created logic hooks to help automated some of the unassignment process.
    [SIGPIC][/SIGPIC]

    Using CE and have 2 or more users? You need SecuritySuite - Teams

  5. #5
    kir
    kir is offline Sugar Community Member
    Join Date
    Nov 2011
    Posts
    702

    Default Re: SecuritySuite settings - inherit from parent

    imagine small distributor company (metal cutting tools)
    manager work on sale process - personal role is Manager (with proper access rights). One manager works with some Accounts records (100 accounts per manager). 6 managers.
    internal engeneers have access to all accounts information - EngRole. they consult managers and help to sale (create tech quotes).
    now need to give access to some accounts with all related information for external engeneer.

    so i set group role for outsource engeneer - can see only Accounts records with assigned group (it is like personal group specially for him). I want him to be able to see all related activities and log calls, tasks, meetings, create some records in custom modules related to assigned accounts records.

    is there better way to achieve this?

  6. #6
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,858

    Default Re: SecuritySuite settings - inherit from parent

    Got it. That makes sense. Having a cascade add/remove option would be an excellent feature request here: https://www.sugaroutfitters.com/support/securitysuite

    For now, I'd suggest adding an after_relationship_add and after_relationship_delete hook to do what you want.
    [SIGPIC][/SIGPIC]

    Using CE and have 2 or more users? You need SecuritySuite - Teams

  7. #7
    kir
    kir is offline Sugar Community Member
    Join Date
    Nov 2011
    Posts
    702

    Default Re: SecuritySuite settings - inherit from parent

    Quote Originally Posted by eggsurplus View Post
    Got it. That makes sense. Having a cascade add/remove option would be an excellent feature request here: https://www.sugaroutfitters.com/support/securitysuite

    For now, I'd suggest adding an after_relationship_add and after_relationship_delete hook to do what you want.
    request done!

    can you give little bit more information about hooks to create
    i'm not so familiar with internals of securitySuite.

    thanks in advanace

    p.s. SecuritySuite premium for 6.3.2 CE

  8. #8
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,858

    Default Re: SecuritySuite settings - inherit from parent

    You could do it much like adding a record to a relationship with any bean. In the hook you would get all related records for the account (cases, contacts, etc) for as deep down as you want to go. For each record add or remove the appropriate group based on the group that was added/removed from the account. I don't have a code snippet on me but will look around when I can grab a minute. Can't guarantee when that will be.
    [SIGPIC][/SIGPIC]

    Using CE and have 2 or more users? You need SecuritySuite - Teams

  9. #9
    kir
    kir is offline Sugar Community Member
    Join Date
    Nov 2011
    Posts
    702

    Default Re: SecuritySuite settings - inherit from parent

    am i got it right:
    mass insert/delete records to/from table securitygroups_records on relationship add/delete event between accounts and given group from securitygroups table?
    will it be enough to achieve subj ?

  10. #10
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,858

    Default Re: SecuritySuite settings - inherit from parent

    Yes, but you can also do it the normal SugarCRM way using the bean relationships. It's up to you. With the bean relationships you would iterate through each related record and add the group to that record. For example, for a contact related to an account it would be something like:
    PHP Code:
    //psuedo code
    while($relatedcontacts as $contact) {
       
    $contact->load('securitygroups');
       
    $contact->add($securitygroup_id);

    [SIGPIC][/SIGPIC]

    Using CE and have 2 or more users? You need SecuritySuite - Teams

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Inherit Teams from parent record
    By jimbo2 in forum Developer Help
    Replies: 2
    Last Post: 2012-11-13, 04:25 PM
  2. Quick button to inherit company address?
    By vocality in forum General Discussion
    Replies: 0
    Last Post: 2012-09-30, 07:48 AM
  3. Inherit Team from Accounts
    By chrislynch8 in forum General Discussion
    Replies: 5
    Last Post: 2010-11-24, 02:52 PM
  4. Inherit field values - Parent/Child
    By dschwed in forum Developer Help
    Replies: 2
    Last Post: 2010-04-02, 07:36 PM
  5. Replies: 4
    Last Post: 2010-03-24, 08:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •