Welcome Guest, Not a member yet? Register   Sign In
Module based events to create configurations
#1

(This post was last modified: 07-29-2022, 01:05 AM by superior. Edit Reason: version information )

Hello,

I've been working on a module based application because I manage different branches in a single solution. This way i'm able to enable/disable modules per user so it looks like something personal for my customers. A few modules require some user specific configurations that's being stored in my database (different table). This is handled through Myth Auth with the permissions table to make shure the user is allowed to use this module.

My question:
Is it possible to trigger an event when a certain permission is enabled to add configurations in my table without having to deal with it manually so the user can start right away?

Myth Auth: 1.2.1
CodeIgniter: 4.2.1
PHP Version: 8.0.14
Reply
#2

The model supports afterInsert and afterUpdate events. Here you can check the compliance with the required permissions and do what you want.
Reply
#3

Is that the proper solution to work with it or are there better ways?
Looking for a longterm solution because these configurations can grow by allot and I would like to use them only if required.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB