Results 1 to 4 of 4

Thread: Very granular (field-level) access control

  1. #1
    dantrainor is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    47

    Default Very granular (field-level) access control

    Hi, all -

    I want to say that I read that the Professional edition would support this functionality, but I thought I'd ask anyway.

    Certain fields I wish for the user to not be able to change. Particulars include all email settings for their particular Mail account. I want them to be administratively adjusted, not adjusted when they feel like it. There's a few other situations like that, as well.

    Basically, I'm looking for a very granular way of controlling permissions on specific fields that SugarCRM displays.

    Anyone have any tips?

    Thanks!
    -dant

  2. #2
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Very granular (field-level) access control

    Field level access is not available in CE. I am busy building a module that can add that functionality but it is very beta at the moment.

    Quote Originally Posted by dantrainor View Post
    Certain fields I wish for the user to not be able to change. Particulars include all email settings for their particular Mail account. I want them to be administratively adjusted, not adjusted when they feel like it.
    This can be achieved quite easily with a before_save logic hook that simply discards the changes if it is a non admin user. Create an before_save logic hook on Users that does something like this.
    PHP Code:
    global $current_user;
    if (!
    is_admin($current_user))
    {
        
    $bean->sensitive_field $bean->fetched_row['sensitive_field'];

    Users will realize very quickly that they can not change those fields and they will never complain about it because they know it something they should not be doing :-)


    M
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

  3. #3
    dantrainor is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    47

    Default Re: Very granular (field-level) access control

    Good morning, Marnus -

    Excellent, thank you so much.

    As far as making a visual representation on the field to indicate that the user cannot change said data, what do you propose one could do for that? Is there a solution akin to the one that you've suggested for not allowing the updates?

    Thanks!!
    -dant

  4. #4
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Very granular (field-level) access control

    It will NOT be upgrade safe, but you could tinker with the templates (.tpl) in modules/Users

    Of course if you are going to change the the templates you could hide the fields altogether with some clever template logic :-)

    M
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. User management - Access level
    By ferrarih in forum Help
    Replies: 2
    Last Post: 2007-10-19, 06:15 PM
  2. Document access control
    By deanloh in forum Help
    Replies: 2
    Last Post: 2006-05-26, 01:57 PM
  3. Replies: 0
    Last Post: 2006-04-10, 06:31 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
  •