You can now create groups by using User Repository identity service. Admins and Members are the default groups available in the User Repository identity service. Users can create custom groups as well. When a user is added, the user must be part of a group. By default, all users are associated to the Members group.
Based on the groups you create in User Repository and the response in identity service, you can now directly handle your logic/code in controllers created in MVC (modules in non-MVC) platform, for apps. Your logic/code can include selected functionality targeted to a specific set of users in a group.
Note: For configuring groups for other identity service types, refer Groups Support for Identity Services.
To understand the functionality of Groups feature, let us take an example of the sample app KonyEmployeeDirectory. You will learn how to handle groups to authenticate CRUD operations in user forms in the app.
The following table details the forms used in the KonyEmployeeDirectory sample app versions authenticated and authorized based admin and member groups.
Forms available to users in the Admin group (allows CRUD operations) | Forms available for users in the Member group (allows Read-only operations) |
---|---|
Form: Employee Details Navigation: Directory; Default launch screen
|
|
Form: Employee List / Directory Navigation: Directory; Default launch screen
| |
Form: Edit Master Navigation: Directory; Default launch screen
|
Navigate to app to the Kony Fabric services by using the Data panel.
By default, Kony User Repository (Userstore) identity service is linked to the app.
Sample Test Response:
{
"profile": { "userid": "User1@kony.com", "email": "User2@kony.com", "firstname": "User_Admin", "lastname": "Das", "user_attributes": { "user_id": "User1@kony.com", "groups": [ "Admin" ] }, "profile_attributes": },}
The frmLoginController module is selected. The frmLoginController details sample code to fetched groups details that you configured in Kony Fabric User Store:
Sample Code | Description |
---|---|
| The Admin is the group in User Repository, which can contain users. You can write your logic to allow these users to perform CRUD operations in the Admin app version. |
|
Copyright © 2020 Kony, Inc. All rights reserved. |