This is a test message to test the length of the message box.
Login
|

024: Recycling-Heroes - Restriction Types (Contact)

106

How can we ensure that permissions in the Contacts app can be granted dynamically? In this episode, we'll look at Restriction Types.

Advertising


Introduction

Last time, we implemented various permission checks in our application to restrict data and actions. Finally, we assigned the object via the IAM app to obtain and work with the permissions. Currently, the values are hard-coded and we cannot adjust them in the roles. Therefore, in this episode, we will look at Restriction Types and how we can use them to dynamically control permissions.

 

Objects

As a first step, we create new objects, starting with a Restriction Field. We can begin creating them via the context menu and find the appropriate type among the objects. We can name the field exactly the same as our Authorization Field and add a descriptive name. Once the object is created, we need to assign our Authorization Field, as we will maintain this later in the permissions settings. We can obtain the field via the Content Assist. Finally, we can check the available values using the "Search Help" button. If we activate the checkbox, we could also maintain ranges. However, since we only have three values, this isn't necessary.

After saving, we can then create a new Restriction Type. We can do this directly via the link at the bottom, as this starts the wizard and also assigns the field to the new object at the end. Let's now assign a name and a description and create the new object. The field is already assigned here, so we can now assign our authorization object. This establishes the connection to maintenance. Finally, don't forget to publish the object using "Publish Locally".

 

Assignment

To use the new Restriction Type, we need to assign it to our Business Catalog. First, we search for the type and add it to the position. Then, we activate the three checkboxes to use the Restriction Type for these methods. Finally, we save and publish the catalog.

Finally, we adjust the permissions in the IAM app and remove the contact type, as we want to manage this via the role. We leave the various activities as they are for now. Basically, the different activities are assigned to actions like Write or Read and are then enabled or disabled via the various restrictions. Here, you should also remember to publish the updated permissions to Launchpad.

 

Restricted Permissions

After all objects have been enabled, saved, and published, we go to Launchpad and open the "Maintain Business Roles" application. There, we access the ZRH_ADMIN role and enter maintenance mode via "Edit". We can start maintaining individual permissions using the "Maintain Restrictions" button. Currently, the permissions are set to Unrestricted, which applies to all permissions. Therefore, we set Write and Read to Restricted, thus activating the maintenance of these objects. We can now maintain the contact type for which we want to grant permissions. For testing purposes, we set Write and Read for Employee and only Read for Address. Finally, we save the role so that the new permissions are applied.

Returning to the Launchpad and our area, we see four data entries already displayed on the tile, and we open the application. There we now see employees and addresses for which we now have permissions. If we go to an employee's record, we can still edit it, but deletion is not possible because we don't have the necessary permissions via the IAM app. If we now access an address, we cannot edit it, and creating a new address also doesn't work.

 

All Permissions

Now let's go back to managing the role and set the values to "Unrestricted", save the role, and go back to the application. There, we can again see and edit all types of contacts. To obtain all permissions as an administrator, we adjust the permissions in the IAM app and also activate the checkbox for "Delete". Then we publish the new permissions to the Launchpad. Now we can check whether we can delete the data records again. All actions are now available again on the Object Page, and we therefore have all the permissions we need as an administrator.

 

Summary

We can now restrict permissions to the data via the role to offer our users only the relevant data. Likewise, only authorized employees can edit the data, and apart from the administrator, no one can delete the data records from the system.

That brings us to the end of the episode. Thanks for watching and see you next time.

 

YouTube
Video


Included topics:
YouTubeSkriptRecycling-HeroesRestrictionPermisson
Comments (0)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Tuesday and Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


035: Recycling-Heroes - New entity (Document)

Category - YouTube

After generating the app, the actual development phase begins. The app needs to be adapted and expanded for our use in order to meet our specific requirements. Therefore, we are extending the data model with a new entity.

02/23/2026

034: Recycling-Heroes - Object and RAP Generator (Document)

Category - YouTube

In this episode, we create our new document app using generators to create the data model and then to create the RAP object.

02/02/2026

033: Core Data Service [Basics] - Consumption Modeling

Category - YouTube

In this episode, we look at the modeling of a Consumption View and examine various aspects such as functions, associations, session variables, and virtual fields.

01/26/2026

032: Recycling-Heroes - Tags and Types

Category - YouTube

In this episode, we'll create additional business configurations that we'll need later in our data model. Some of the properties have changed, and we'll examine these changes in detail.

01/19/2026

031: Recycling-Heroes - Unit Testing (Configuration API)

Category - YouTube

Now that we've finished the Configuration API, let's take a look at unit tests and how we can automatically test our API. This will save us the effort of manual testing later on.

01/05/2026