4D Blog

Home Product ORDA – Permissions – Restrict / allow web access to the resources in one click

ORDA – Permissions – Restrict / allow web access to the resources in one click

November 27, 2025

Product

Discover here, how, in web processes, you can protect your resources (data + business logic) from malicious accesses and from unauthorized users … in one click.

In development mode, set the Restrict access by default property to FALSE to concentrate on your code organization, data model, Qodly pages architecture, tests … without any restriction to use data or to call functions.

When ready to implement user profiles, just set the Restrict access by default property to TRUE to ensure nobody will access your data and business logic without being explicitly authorized.

HDI_RestrictAccessByDefault

Reminder

Since 4D 20, 4D provides a powerful and fully customizable system to protect the resources (data + business logic) from unauthorized users.

This system offers a customizable level of granularity and relies on the presence of privileges in the session. Privileges must be set up in the roles.json file and authorized to run some actions (Read, Create, …) on some resources (dataclasses, attributes, functions).

Privileges apply on web processes using scalable web sessions, e.g.: REST requests, remote datastores, Qodly apps.

When the user is granted to enter the application, the authentication implementation must put the appropriate privileges in the session.

Then, when the application receives a web request, a control is done regarding the presence of privileges in the session. Only authorized actions can be done.

A permission error is raised if the action on the resource is not permitted.

the restrict access by default property

With 4D21, new boolean property is available in the roles.json file: restrictedByDefault.

It allows to set up the default behavior regarding web accesses to the resources below:

  • the datastore
  • a dataclass
  • an attribute
  • a data model class function
  • a singleton function

 

This impacts only resources where no permissions have been set up.

If FALSE: the resources are accessible by default

If you don’t set up any permissions, all your resources are accessible regarding any action Create, Read, Update …

If you set up permissions, all your resources not involved in permissions remain accessible.

If TRUE: access to the resources is restricted by default

If you don’t set up any permissions, nothing in your resources is accessible.

If you set up permissions, all your resources not involved in permissions remain UNaccessible.

The Qodly Roles and privileges interface

You may have already used the Qodly studio Roles and privileges interface. It offers a user friendly UI to set up the permissions for your app. This UI now offers to update the Restrict access by default property.

with previous 4D versions

If your application runs with a previous 4D version, it is equivalent to having restrictedByDefault set to FALSE. You can get a similar level of security by creating an all privilege, granted to run all actions on the Datastore.

And never give this all privilege to any user.

blank

Starting a new project

When you create a new project the roles.json file is set up as is:

blank

Because restrictedByDefault is False, this helps starting a new development. You can concentrate on your code, forms design, function calls and access your data without being hindered.

best practice

For optimum security, when ready to implement user profiles, we recommend to set the restrictedByDefault property to True and to set up privileges to ensure:

– your resources are protected against external malicious accesses

– each user is granted to run only authorized actions on permitted data

example

In the example below, the data model is:

blank

 

 

 

 

 

 

 

 

In the roles.json file:

blank

thus:

– it is impossible to access the SecretInfos dataclass (Read, Create, Update, …)

– the viewPeople privilege is required to read the People dataclass, other actions on the People dataclass are not granted

The attached HDI demonstrates that.

 

Don’t wait to set up permissions to secure your application and your data while handling accurate and appropriate user profiles.

Discuss

Tags 21, 4D Qodly Pro, ORDA, Permission, REST, Session, Web, Web session

Latest related posts

  • December 3, 2025

    Give AI to a 30 years old 4D application

  • November 28, 2025

    ORDA – Handle an event-driven logic during database operations

  • November 17, 2025

    Goodbye 4D Internet Commands – Hello Modern Internet Integration

Avatar
Marie-Sophie Landrieu-Yvert
- Product Owner - Marie-Sophie Landrieu-Yvert joined the 4D Product team as a Product Owner in 2017. In this role, she is responsible for writing user stories and translating them into functional specifications. She also ensures that the delivered feature implementation meets the customer's needs. Marie-Sophie graduated from the engineering school ESIGELEC and began her career as an engineer at IBM in 1995. She took part in various projects (maintenance and development projects) and worked as a COBOL developer. She then moved on to work as a UML designer and Java developer. More recently, her main responsibilities included analyzing and writing functional requirements, and coordinating business and development teams.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy