Good morning Friends,
I used the below codes to block users who are not super users to add new issues.
In my rule only the superuser could adicinar new issues, however you can tailor your business rule.
Hope this helps.
IF @object_type='84' AND (@transaction_type='A' or @transaction_type='U')
Begin
DECLARE @usercode INT
DECLARE @username varchar(10)
SET @usercode = (SELECT UserSign FROM [OCLS] WHERE Code = @list_of_cols_val_tab_del)
SET @username = (select U_name from [OUSR] where INTERNAL_K = @usercode)
IF @usercode not in (Select USERID from OUSR where SUPERUSER = 'Y')
BEGIN
SELECT @error =84, @error_message = 'Usuário sem permissão para criar novo assunto!'+' '+'Usuário: '+@username
END
END