1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

User editing own records and read only for ALL records

Discussion in 'Community' started by Indrit, Oct 14, 2021.

  1. Indrit

    Indrit Member

    Level: Community
    Hi, I am trying to set up specific user access with the following access:
    1. the specific user can be able to edit his/her own record(s) which i very easily set it up following the instruction here http://www.fabrikar.com/forums/index.php?wiki/users-editing-own-records/
    2. in addition to number 1, user needs to be able to "read only" all other records for all other users.

    Thanks, Indrit
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Don't use a prefilter in this case but use "or use field" in list access settings.

    Gesendet von meinem SM-G930F mit Tapatalk
     
  3. Indrit

    Indrit Member

    Level: Community
    I have tried and no luck
    please see below:
    Access
    View list --> Public
    View records --> Public
    Edit records --> Public
    or use field --> -
    Add records --> Public
    Delete records --> Super User
    or use field --> -
    Empty records --> Super User

    Pre filters I have the following:

    Join | Field | Condition | Value | Type | Apply To
    Where | User(raw) | EQUALS | {$my->id} | Text | Registered
    OR | User(raw) | GREATER THAN | 0 | Text | Super User


    What do I need to change.

    Thanks, Indrit
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    "Don't use a prefilter in this case but use "or use field" in list access settings."

    So NO prefilter, edit records = eg superadmin, or use field = your user field,


    Gesendet von meinem SM-G930F mit Tapatalk
     
    Indrit likes this.
  5. juuser

    juuser Well-Known Member

    Level: Community
    Yes, use @troester's solution, but also the pre-filter way should work and I see no problems in your pre-filter settings. Just check that the user id-s really exist in database under "User" field and make sure that the user you are viewing the list with, does not belong to "Super User" and belongs to "Registered".
     
    Indrit likes this.
  6. Indrit

    Indrit Member

    Level: Community
    Thank you so much both of you. My trouble was that I was utilizing both Pre-Filters and Access setting in List and I think they were canceling each-other! I got rid of all pre-filters and I did some access adjustments and now it works fine.

    So far, The only user who can edit, read, delete any record no matter who is the owner is Super-User.
    My question: How can I grant such powers to a specific user in addition to the Super User without making him a Super User for the whole site.

    Is this the place where using Pre-filters is the right thing to do?

    Any suggestion, hint would be greatly appreciated.

    V/r
    Indrit
     
    Last edited: Oct 16, 2021
  7. lousyfool

    lousyfool Active Member

    Level: Community
  8. Indrit

    Indrit Member

    Level: Community
    they look a little confusing..

    the specific user who I would like to grant super user powers for editing, reading, deleting records only has an ID = 144 Can I just write some code, or pre filter for it and be done?

    I tried to understand each link but i don't think I am able to finalize what I am trying to achieve.

    NOTE: The goal is for this user to be able to edit, read, and delete ALL records not just a specific record!!

    V/r Indrit
     
  9. juuser

    juuser Well-Known Member

    Level: Community
    You can just create new access level and make sure the user who is in SuperUser role and the user with id 144 belong to that level via usergroups and then set add/view/edit access to the newly created access level in list settings.
     
  10. Indrit

    Indrit Member

    Level: Community
    Okay, so..
    1. I created a group called "CCG C-Suite" with group Parent "Registered"
    2. I created a new access level called "C-Suite" (Note: this level is not associated with any other level!)
    3. I went to Configuration/Global/Fabrik and click "Permissions" and the user group "CCG C-Suite" i changed from "inherited" to "Allowed" for the following
    • Delete
    • Edit
    • Edit State
    4. Went to Users and clicked to the user name and went to the "assigned User Groups" tab and in addition to "Registered" also I clicked "CCG C-Suite"

    Saved everything and nothing changed!!

    Any suggestions?

    V/r Indrit
     
    Last edited: Oct 18, 2021
  11. juuser

    juuser Well-Known Member

    Level: Community
    No, do not change any permissions in Fabrik global options. Set the access levels in the Fabrik list settings.

    And make sure group "CCG C-Suite" belongs to access level "C-Suite" and both users belong to "CCG C-Suite" group (maybe they already do, but you didn't mentioned this in your post).
     
    Last edited: Oct 18, 2021
  12. Indrit

    Indrit Member

    Level: Community
    don't know where exactly I need to do that on the access levels in fabrik list settings. I am including here screen shots for your refence and instruction.
     

    Attached Files:

  13. juuser

    juuser Well-Known Member

    Level: Community
    In Fabrik list settings (fabrik_seeting_list.jpg) change SuperUser to C-Suite.
     
  14. Indrit

    Indrit Member

    Level: Community
    it worked! Thank you very much following up with your help!

    V/r
    Indrit
     

Share This Page