Editing an entry without permissions

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
amootoo
Posts: 3
Joined: 2019-11-10 15:58

Editing an entry without permissions

Post by amootoo » 2019-11-10 18:56

Hi,
For security reasons I have to disable(in permissions) a user from editing an entry after it is created, but I would like to add a button or a way so the user can add a time to an entry later.

Hope it makes sense.

amootoo
Posts: 3
Joined: 2019-11-10 15:58

Re: Editing an entry without permissions

Post by amootoo » 2019-11-14 18:21

Do you know how can that be achieved?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1814
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Editing an entry without permissions

Post by jsetzer » 2019-11-14 18:33

Hi,

maybe this post here can help you:
viewtopic.php?f=11&t=3289&p=11389#p11389

I have added a button for "locking" a record so the user cannot edit any more. In this state there is a button for "editing" that records.

Technically speaking I'm just changing to record owner to "admin" (user cannot edit any more) or to current user (user can edit). It is important to change the permissions on that table to grant editing rights to "owner", only.

You can use the built-in function set_record_owner($tablename, $primaryKey, $newOwnerMemberID) to toggle the ownership between different users.

ezgif.com-optimize (2).gif
ezgif.com-optimize (2).gif (211.23 KiB) Viewed 2316 times
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

amootoo
Posts: 3
Joined: 2019-11-10 15:58

Re: Editing an entry without permissions

Post by amootoo » 2019-11-15 04:16

Thanks for the reply!
I'll try that.

Post Reply