Results 1 to 8 of 8

Thread: Help With Create And/Or Edit

  1. #1
    eightball is offline Member
    Join Date
    Mar 2009
    Posts
    6

    Default Help With Create And/Or Edit

    Yes I was wondering if anyone has any input on how to be able to Create and/or Edit. Right now the only thing anyone can do is Create/Edit as one feature in the Role Management, but I would like these two to be separate features. If anyone has any input as to how this can be down, please let me know.

    Thanks,

    Frank

  2. #2
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: Help With Create And/Or Edit

    In the Roles you have different Access rights for
    • access
    • delete
    • edit
    • export
    • import
    • list
    • view
    You just have to define roles for your users and assign them.
    Be carefull, Sugar uses restricting roles. That means that every additional role will cut the rights of the user who got this role.
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  3. #3
    eightball is offline Member
    Join Date
    Mar 2009
    Posts
    6

    Default Re: Help With Create And/Or Edit

    I understand the role management section. That isn't the current issue. Let me give a better example...

    User Kenneth.Thorman created a modification back for v4.x - 5.0 that allows the admin to actually separate the create/edit functionality into two functions of a role.

    See topic:

    Click Here

    There are a few problems with this modification.


    • It doesn't work for the current version (5.2)


    • After an install of a previous version of Sugar (namely 5.0), we were able to insert the code and get it to do the following:


    • Create a table within the role management section called "Create", along with the ability to assign permissions to each module

    • Have said permissions give the ability to use and save the quick create form located on the lefthand sidebar.

    • User can then create a new lead, but cannot edit said lead.

    The problem:

    This doesn't include any of the custom fields the end user may implement. It doesn't actually include the default fields included with Sugar, either. Just a simple, First Name, Last Name, Address, Phone Number, and Assigned To (X USER), field set.

    So here's what we were wondering:

    Is it even possible, using the foundation started with Kenneth's mod, to:


    • Have a button called, "Create" that brings in the entirety of the fields you have created and/or the default fields that have been maintained


    And


    • Maintain that once this information is created, none of it can be edited


    And


    • Maintain the ability to allow or disallow this function across modules



    Sorry -- it's a little more complicated than I had originally intended, but I figure this should get the full concept across as to what I'm trying to accomplish.

    I'm just looking for some direction. I asked Kenneth, but he indicated that he's currently swamped with other projects, and recommended that I hop on over to the boards to see if I could get some assistance... So here I am....

  4. #4
    eightball is offline Member
    Join Date
    Mar 2009
    Posts
    6

    Default Re: Help With Create And/Or Edit

    Sorry for the double post... Would've edited my first, but this is a completely different approach, so I'm curious as to whether it would be more complicated or easier...

    I'm assuming that the reason create/edit are lumped into the same category is because they currently run off the same .php file (i.e. view.edit).

    My thought is this...

    Keep the Create and the Edit functionality in for every user. Then, duplicate the view.edit so it becomes view.edit2.php (or something of the like).

    When a user clicks on Create, it calls view.edit.php, and they're allowed to enter the information accordingly.

    However, when they click on the Edit button, it calls view.edit2.php, which in effect, has an if-else statement that checks to see if the user is an Administrator or not. If the user is an Admin, it will forward them to the Edit page, allowing them to fully edit the components within the previously created lead. If the user is not an Admin, then they get a called page (i.e. sorry.php) that says, "You currently do not have the allowed permissions to edit this entry." and then a link or something that takes them back to the lead itself.

    I'm just shooting ideas out, so if any of these even scream plausibility, please, help point me in the right direction...

  5. #5
    eightball is offline Member
    Join Date
    Mar 2009
    Posts
    6

    Default Re: Help With Create And/Or Edit

    *bump*


    Anybody have any thoughts?

  6. #6
    mariusmotoc is offline Junior Member
    Join Date
    Jan 2008
    Posts
    4

    Default Re: Help With Create And/Or Edit

    Hello...

    I have the same problem... the edit view has 2 sections for one of my modules. the problem is: I want regular users to have access only in the top section of editview, and for the administrators of module to have full access to the edit view.

    the problem can be translated like this:
    regular user needs only to create a task giving the minimal informations, but the evolution of the task has to be edited working on all the fields (by module users with full rights or admins). in Sugar Create/Edit are linked... you cannot have rights to create an task without having rights to edit it.

    Maybe if a new view (e.g. createview) would be implemented and create and edit roles would be separated the problem will disappear.

    Thank you for any idea.

    Marius

  7. #7
    eightball is offline Member
    Join Date
    Mar 2009
    Posts
    6

    Default Re: Help With Create And/Or Edit

    Seems like we're both on the same page in terms of what we'd like to see here. On your end, though, I think you could possibly download the Field Level Access modification (unless I'm not getting what you're trying to do completely). This would allow you to specify which fields can be modified. So, for example, you would set things such as:

    First Name
    Last Name
    Address
    State
    Zip
    Phone Number

    as a field level access: Create/Edit

    and then any other fields (including custom or otherwise), you would set to "Read Only"...

    In fact, with this mod, you wouldn't probably even need any new code. I'm fairly sure (in the brief time I spent looking at the mod) that this is further applied to specific roles. So you'd be able to set it up so your Administrators could have full rights to everything, and then Standard Users could only have access to the top fields, and then the bottom fields would be, essentially, grayed out (or entirely invisible, given that the mod has the ability to choose "none").

    (EDIT: Forgot the link!)

    Sugar Forge Link:: http://www.sugarforge.org/projects/fieldacl/

    Check that out and let me know if that works out for what your'e trying to do.

    My issue with this mod is that the user can then go back and still edit the fields "First Name", "Last Name", "Address", etc etc.. after they've put the information in. I don't like giving people the power to wipe out entire things as they see fit, especially something so important as a phone number (hence my current search for the separation of said permissions).
    Last edited by eightball; 2009-03-19 at 05:33 PM. Reason: Forgot a link...

  8. #8
    eightball is offline Member
    Join Date
    Mar 2009
    Posts
    6

    Default Re: Help With Create And/Or Edit

    *bump again*

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. create and edit field
    By farid in forum Developer Help
    Replies: 4
    Last Post: 2008-12-15, 09:05 AM
  2. Create but not Edit
    By maturs in forum Developer Help
    Replies: 1
    Last Post: 2008-11-18, 06:00 AM
  3. Replies: 3
    Last Post: 2008-08-06, 12:31 AM
  4. Replies: 0
    Last Post: 2006-10-28, 12:02 AM
  5. Edit Account / Create User Problem
    By adrianleevbs in forum Help
    Replies: 4
    Last Post: 2006-04-28, 07:36 AM

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
  •