0

What is the best method for listing users and getting their associated table permissions for a progress database?

Joe Meyer
  • 4,315
  • 20
  • 28

4 Answers4

1

I ended up writing a quick sql query against my odbc for this for auditing purposes.

SELECT * FROM sysprogress.systabauth ORDER BY grantee, tbl

It also looks like there are a couple of stored procedures (at least in our environment) which may get you what you need:

SQL_TABLE_PRIVILEGES
SQL_TABLE_PRIVILEGES2X
Joe Meyer
  • 4,315
  • 20
  • 28
1

The permissions for the 4GL engine and SQL-92 engines are handled somewhat differently.

From the 4GL perspective you want to look at the _User table to find users. I.e.:

for each _user no-lock:
  display _user.
end.

To see table permissions you look at the CAN-* fields of tables:

for each _file no-lock where _hidden = no:
  display
    _file-name
    _can-read
    _can-write
    _can-create
    _can-delete
  .
end.

The docs that Tim points to have lots more detail.

Tom Bascom
  • 13,405
  • 2
  • 27
  • 33
0

Users are stored in the _user table. You can see more on how Progress does security and identity management by consulting their Identity and Security Docs here: http://communities.progress.com/pcom/docs/DOC-107735

Tim Kuehn
  • 3,201
  • 1
  • 17
  • 23
0

This will give you a list of users and the rights they have on each table in the current database:

FOR EACH _user
    NO-LOCK:
    DISPLAY
        _User._Userid
        _User._User-name.
    FOR EACH _File
        WHERE _File._Hidden = FALSE
        NO-LOCK:
        DISPLAY
            _File._file-name FORMAT "x(20)"
            CAN-DO(_File._can-read,_User._userid)
                FORMAT "Y/N" COLUMN-LABEL "Read"
            CAN-DO(_File._can-write,_User._userid)
                FORMAT "Y/N" COLUMN-LABEL "Write"
            CAN-DO(_File._can-create,_User._userid)
                FORMAT "Y/N" COLUMN-LABEL "Create"
            CAN-DO(_File._can-delete,_User._userid)
                FORMAT "Y/N" COLUMN-LABEL "Delete"
            .
    END.
END.

This report will get big very quickly, depending on the number of users and tables in your database.

RonaldB
  • 1,110
  • 1
  • 10
  • 19