• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

[SOLVED] Lock Row Plugin of F2 missing

Status
Not open for further replies.
Confirmed.
I assume it's working like the canEditRow
NOTE the above precedence was change on 12/1/2017. The plugin now takes precedence over the list's normal group/user ACLs. If the plugin returns true or false, this overrides the list's ACLs.
Which doesn't make sense in case of lockrow.
 
Ah, I see the problem. It's returning true or false on canEdit ... it needs updating to the "new" way canEdit works, which is that it can now return null if it has no opinion. Used to be that canEdit had to return true or false, and always overrode ACL's. A year or so ago I changed that so canEdit can return null, and the access then punts to the normal ACL mechanism.

I think I just need to change it so if it's not returning false (row is locked) it returns null instead of true.

-- hugh
 
Hi Hugh,
many thanks. I've made an update from github and it looks good. I'm combining now lockrow with caneditrow to prevent updating older records.
If you have time, it would be perfect, to hide the lock icons on not editable records... it's just on my wishlist ;)
Cheers,
Bianka
 
How about if the row is locked because it's locked, rather than because of normal ACLs?

Doing that would prevent the owner form unlocking the row from the list.

So I'm guessing the options for a "Show Icon when not Editable" would be "Yes / No / ACLs Only" (or perhaps "Show Unlock for Lock Owner").

-- hugh
 
PS, I've started adding the code to allow locking from list view as well as unlocking. Don't know if that's useful to you, but it's something I always intended to do, just never got round to it.

-- hugh
 
Here's the commit for the option to hide the icons if the user doesn't have edit access.

https://github.com/Fabrik/fabrik/commit/39882d3c976fd2d31873212ab08e11c744e06919

And there's a commit after that which implements the icon naming options, so you can use different icons.

Note that even if the user doesn't have ACL access, if they own the lock, they will still see the icon and be able to unlock the row. The AJAX unlocking from the list is not ACL protected. The AJAX unlock only checks to see if the lock is owned by the same user.

(It's unlikely the situation of a lock owner not having edit access would ever arise, as they would need edit access to lock it in the first place, but could happen)

When I implement AJAX locking, it will be ACL protected. But I'll leave unlocking with the only test being "does this user own the lock".

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top