Kbase P111792: 4GL/ABL: Is there a way to limit changes to schema tables, sequences, indexes and fields to one or
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/1/2008 |
|
Status: Verified
GOAL:
4GL/ABL: Is there a way to limit changes to schema tables, sequences, indexes and fields to one or more users without creating users in the _User table?
GOAL:
How to limit the 4GL schema modification privileges to specific users without having to create users in _User table?
GOAL:
How to programmatically prevent schema changes by unauthorized users without having to define users in the _User table?
FACT(s) (Environment):
All Supported Operating Systems
Progress 8.x
Progress 9.x
OpenEdge 10.x
FIX:
Yes, provided the user(s) authorized to modify the database schema log to the system using Operating System Userid(s) and Password(s). This is because the Progress USERID function returns the operating system userid if there are no records in the _User table. For example, the following code sample limits the above mentioned schema modification privileges to the two users "jack" and "jill":
DEFINE VARIABLE cAuthorizedUserList AS CHARACTER NO-UNDO.
ASSIGN
cAuthorizedUserList = "jack,jill".
FIND _File WHERE _File-Name = "_File".
ASSIGN
_File._Can-Create = cAuthorizedUserList
_File._Can-Delete = cAuthorizedUserList
_File._Can-Write = cAuthorizedUserList
_File._Can-Load = cAuthorizedUserList.
FOR EACH _Field OF _File:
ASSIGN
_Field._Can-Write = cAuthorizedUserList.
END.
FIND _File WHERE _File-Name = "_Sequence".
ASSIGN
_File._Can-Create = cAuthorizedUserList
_File._Can-Delete = cAuthorizedUserList
_File._Can-Write = cAuthorizedUserList
_File._Can-Load = cAuthorizedUserList.
FOR EACH _Field OF _File:
ASSIGN
_Field._Can-Write = cAuthorizedUserList.
END.
FIND _File WHERE _File-Name = "_Field".
ASSIGN
_File._Can-Create = cAuthorizedUserList
_File._Can-Delete = cAuthorizedUserList
_File._Can-Write = cAuthorizedUserList
_File._Can-Load = cAuthorizedUserList.
FOR EACH _Field OF _File:
ASSIGN
_Field._Can-Write = cAuthorizedUserList.
END.
FIND _File WHERE _File-Name = "_Index".
ASSIGN
_File._Can-Create = cAuthorizedUserList
_File._Can-Delete = cAuthorizedUserList
_File._Can-Write = cAuthorizedUserList
_File._Can-Load = cAuthorizedUserList.
FOR EACH _Field OF _File:
ASSIGN
_Field._Can-Write = cAuthorizedUserList.
END.
FIND _File WHERE _File-Name = "_Index-Field".
ASSIGN
_File._Can-Create = cAuthorizedUserList
_File._Can-Delete = cAuthorizedUserList
_File._Can-Write = cAuthorizedUserList
_File._Can-Load = cAuthorizedUserList.
FOR EACH _Field OF _File:
ASSIGN
_Field._Can-Write = cAuthorizedUserList.
END.