Support > Repository > Authentication/Authorization > Apply group authority to view of application example database

You can use the group privilege provided by Wagby by making the following settings in the view (of the database to use).

Prepare the following columns in the database view.

  • Useridjshparam column.
  • (View name) $ jgroupidjshparam table.

The useridjshparam column adds "useridjshparam" to the SELECT clause of the view to be prepared and returns the data owner account.
(View name) In the $ jgroupidjshparam table, store the group ID of the group to which the data belongs.The group ID uses the primary key jgroupid of the jgroup table.

It is a good idea to use xxxx $ jgroupidjshparam table in another model and refer to this.
(View name) You can also prepare the $ jgroupidjshparam table as a view, not actually a table.
The group authority controls browsing/updating by specifying the narrowing condition in the WHERE clause.Since the narrowing part of the WHERE clause is automatically generated by the Wagby side, it works by preparing the useridjshparam column and xxxx $ jgroupidjshparam.