× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hmmm...

There's nothing completely built in.
Assuming you have a column, CREATED_BY that stores the user id of the
creator...

Row and Column Access Control comes close...but the following isn't
actually allowed..

CREATE PERMISSION CREATED_BY ON MYTABLE
FOR ROWS WHERE CURRENT_USER = CREATED_BY
ENFORCED FOR ALL ACCESS
ENABLE;

https://www.ibm.com/docs/en/i/7.4?topic=statements-create-permission
From the example, it appears you could create a UDF to handle the
comparison...
CREATE PERMISSION CREATED_BY ON MYTABLE
FOR ROWS WHERE SAME_USER_UDF(CREATED_BY) = 1
ENFORCED FOR ALL ACCESS
ENABLE;


Note that *ALLOBJ doesn't get around RCAC


Otherwise, a READ trigger (and before UPDATE trigger?) could do what you
need to do. Again, assuming you have or add a CREATED_BY column.

I question why you think you need this?
Might consider instead of a single table, allowing each user to have
their own table their own schema with the same name as their user ID.

Charles







On Wed, Aug 24, 2022 at 9:29 AM Brad Stone <bvstone@xxxxxxxxx> wrote:

Is there anything out there/built in where you can set up record level
security to a DB so only a user who wrote the original record can
access/read/change the record in the file?

Bradley V. Stone
www.bvstools.com
Native IBM i e-Mail solutions for Microsoft Office 365, Gmail, or any Cloud
Provider!
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.