Kbase P128436: 4GL/ABL: Sample procedure to generate a report on the existing table and field data security setting
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  6/8/2009 |
|
Status: Verified
GOAL:
4GL/ABL: Sample procedure to generate a report on the existing table and field data security settings of a Progress database.
GOAL:
How to write a report on user table and field data access permission settings of a Progress OpenEdge database?
GOAL:
How to access the user table and field data security settings of a Progress database?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
The following procedure generates a data security report on all the existing user data tables, including the _User table, and their fields:
DEFINE VARIABLE cLineSperator AS CHARACTER NO-UNDO.
OUTPUT TO SecuritySettings.txt.
FOR EACH _file NO-LOCK WHERE _Tbl-Type = "T" OR _File._File-Name = "_User" BY _File._File-Name:
cLineSperator = FILL("=", 187).
PUT UNFORMATTED
"_File._File-name" AT 1
"_File._Can-Read" AT 32
"_File._Can-Write" AT 63
"_File._Can-Create" AT 94
"_File._Can-Delete" AT 125
"_File._Can-Dump" AT 156
"_File._Can-Load" AT 187 SKIP.
PUT UNFORMATTED cLineSperator SKIP.
PUT UNFORMATTED
_File._File-name AT 1 FORMAT "X(30)"
_File._Can-Read AT 32 FORMAT "X(30)"
_File._Can-Write AT 63 FORMAT "X(30)"
_File._Can-Create AT 94 FORMAT "X(30)"
_File._Can-Delete AT 125 FORMAT "X(30)"
_File._Can-Dump AT 156 FORMAT "X(30)"
_File._Can-Load AT 187 FORMAT "X(30)" SKIP.
cLineSperator = FILL("-", 187).
PUT UNFORMATTED cLineSperator SKIP.
PUT UNFORMATTED
"_Field._Field-name" AT 1
"_Field._Can-Read" AT 32
"_Field._Can-Write" AT 63 SKIP.
cLineSperator = FILL("-", 187).
PUT UNFORMATTED cLineSperator SKIP.
FOR EACH _Field NO-LOCK OF _File BY _Field._Field-Name:
PUT UNFORMATTED
_Field._Field-name AT 1
_Field._Can-Read AT 32
_Field._Can-Write AT 63 SKIP.
END.
cLineSperator = FILL("=", 187).
PUT UNFORMATTED cLineSperator SKIP.
END.
OUTPUT CLOSE.