Protect Change Table With Pin

Can you try adding P in ?Prompt config where we define keyboards like OSC ? For example try OCP.

2 Likes

When Ask Before Creating Ticket setting is enabled it lists entities which have that specific state.

2 Likes

Is this new? We have a pin prompt already???

Yes, that works, thank Emre.

The other thing about this particular setup is that it isn’t really an Admin PIN. It is just an arbitrary PIN used in the Rule.

This is the setup …

##Change Ticket Entity

We will use this Action to reverse the Entity change.

##EL Change Ticket Entity [Change Ticket Entity] (Action)##

Action Name: EL Change Ticket Entity
Action Type: Change Ticket Entity
###Parameters:###
Can Create Ticket: True
Can Create Entity: False
Entity Type Name: [:entityType]
Entity Name: [:entityName]
Entity Search Value:
Update Null Entity:
Entity Screen Name:
Entity Screen Search Value:

##Execute Automation Command

We will use this Action to invoke other Rules and optionally, run a process in the background.

##EL ExecAMC [Execute Automation Command] (Action)##

Action Name: EL ExecAMC
Action Type: Execute Automation Command
###Parameters:###
Automation Command Name: [:AMCname]
Command Value: [:AMCvalue]
Background: [:runBG]
Delay: [:delay]

##Update Program Setting

We will use this Action to store the Old Entity and New Entity, so that we can reverse it if PIN verification fails.

##EL Store Value [Update Program Setting] (Action)##

Action Name: EL Store Value
Action Type: Update Program Setting
###Parameters:###
Setting Name: [:settingName]
Setting Value: [:settingValue]
Update Type: Update
Is Local: True

##Update Entity State

We will use this Action to reverse the Entity State if PIN verification fails.

##EL Update Entity State [Update Entity State] (Action)##

Action Name: EL Update Entity State
Action Type: Update Entity State
###Parameters:###
Entity Type Name: [:entityType]
Entity Name: [:entityName]
Entity State Name: [:stateName]
Current State: [:currentState]
Entity State: [:newState]
Quantity Exp:

##RULE - Ticket Entity Changed

This Rule is repsonsible for detecting the change in the Ticket Entity. It then stores the Old and New Entity Names, and prompts for a PIN. Finally, it invokes the PIN verification via Execute Automation Command Action

##EL Store Entity [Ticket Entity Changed] (Rule)##

Rule Name: EL Store Entity
Event Name: Ticket Entity Changed
Rule Tags:
Custom Constraint List (3):
Execute Rule if: Matches
Entity Type NameEqualsTables
New Entity NameNot Equals{SETTING:EL_oldEntity}
Old Entity NameIs Not Null

##Actions (4):##

EL Store Value

Constraint: (none)

settingName: EL_oldEntity
settingValue: [:OldEntityName]
EL Store Value

Constraint: (none)

settingName: EL_newEntity
settingValue: [:NewEntityName]
EL Store Value

Constraint: (none)

settingName: EL_PIN
settingValue: [?Enter PIN to change Table;;;OCP]
EL ExecAMC

Constraint: (none)

AMCname: EL Confirm Entity Change
AMCvalue: {:EL_PIN}
runBG:
delay:

##Mappings##

Mappings
Terminal User Role Department Ticket Type
****

##RULE - Automation Command Executed - EL Confirm Entity Change

This Rule checks the entered PIN against a value that you set in this Rule. This Rule only fires if the PIN is incorrect. It then shows a “failure message”, then it reverses the Entity change, and finally execute another Automation Command in the background to reset the Entity State.

##EL Confirm Entity Change [Automation Command Executed] (Rule)##

Rule Name: EL Confirm Entity Change
Event Name: Automation Command Executed
Rule Tags:
Custom Constraint List (2):
Execute Rule if: Matches
Automation Command NameEqualsEL Confirm Entity Change
Command ValueNot Equals12345

##Actions (3):##

MSG TEST

Constraint: (none)

MessageToDisplay: Incorrect PIN for Table Change!\rOld:{:EL_oldEntity}\rNew:{:EL_newEntity}
EL Change Ticket Entity

Constraint: (none)

entityType: Tables
entityName: {:EL_oldEntity}
EL ExecAMC

Constraint: (none)

AMCname: EL Update Entity State
AMCvalue: {:EL_newEntity}
runBG: True
delay: 0

##Mappings##

Mappings
Terminal User Role Department Ticket Type
****

##RULE - Automation Command Executed - EL Update Entity State

This Rule is responsible for resetting the Entity State when PIN verification fails. It also clears our stored values for the New/Old Entity Names.

##EL Update Entity State [Automation Command Executed] (Rule)##

Rule Name: EL Update Entity State
Event Name: Automation Command Executed
Rule Tags:
Custom Constraint List (1):
Execute Rule if: Matches
Automation Command NameEqualsEL Update Entity State

##Actions (3):##

EL Update Entity State

Constraint: (none)

entityType: Tables
entityName: [:CommandValue]
stateName: Status
currentState:
newState: Available
EL Store Value

Constraint: (none)

settingName: EL_newEntity
settingValue:
EL Store Value

Constraint: (none)

settingName: EL_oldEntity
settingValue:

##Mappings##

Mappings
Terminal User Role Department Ticket Type
****

1 Like

BTW QMcKay about tutorial builder that you have, can @emre host it so, every can use it.

1 Like

TBH (Tutorial Builder Helper) accesses the local machine DB install, so you need to host it yourself on the same machine that runs the Database Engine. It also requires PHP. I think I released the code in the Beta Forum, did I not?

Yes, you did. But I got some errors. I forgot what it is I tried long time ago.

Dig up that topic and post your errors there. You still need to host it on a machine local to the DB. It isn’t something that Emre can host remotely to access your local configurations. That might be possible in the future, but that was not my intent when I built it. It is also read-only… you cannot alter any of the data using that tool, though that did cross my mind for a future enhancement.

2 Likes

Thanks to you very much