Skip to main content

Lock appointments for users

This guide shows you how to lock appointments so that some users, or all of them, can no longer edit them. The authorization mechanism in Dime.Scheduler is data-driven, which lets you build fine-grained security workflows around your customer's business processes. As with most of Dime.Scheduler, the back office drives the configuration and you control the locking from there.

Authorizing users in Dime.Scheduler

This guide builds on data-driven security. For the full picture, see data-driven security. In short, you can lock appointments and resources using filter groups or visual indicators:

  • With security on filter groups, you segregate roles and responsibilities. For example, users can be configured to only see resources and tasks from a limited number of companies, departments, regions, etc.
  • With security on visual indicators such as categories and time markers, you implement a data and workflow-driven authorization based on the floating values of categories and time markers. For example, users can be barred from modifying the data when an appointment is in a certain state.

Filter groups restrict what resources and tasks a user can see, while indicators limit what a user can do with (planned) tasks.

When you combine security on filter groups, categories and/or time markers, the most restrictive setting wins: every condition must be met before the user can modify the appointment.

info

This data-driven authorization mechanism doesn't necessarily mean users won't see the appointments on the planning board. While users will see all appointments for the resources they see on the planning board, they won't be able to edit or delete appointments that are outside of their security permissions.

Filter group authorization

Filter groups restrict what resources and tasks a user can see.

Once you have set up the filter groups in the back office and sent them to Dime.Scheduler, apply the data-driven security as follows:

  1. In Dime.Scheduler, go to the Users administration page.
  2. Select the user you want to secure.
  3. In the bottom tab panel, select the filter group tab.
  4. Select the values that apply to that user.

From now on, this user will only see resources and tasks that match the selected filter values.

Indicator authorization

Authorizing users through indicators works the same way. Indicators limit what a user can do with (planned) tasks.

Once you have set up the categories and time markers in the back office and sent them to Dime.Scheduler, apply the data-driven security as follows:

  1. In Dime.Scheduler, go to the Users administration page.
  2. Select the user you want to secure.
  3. Navigate to the pane at the bottom.
  4. Select the categories and time markers that apply to that user.
tip

When you send a job or task from the back-office system to Dime.Scheduler, you can specify default indicators. These values are applied when the user drops the open task to the planning board.

From now on, this user will only be able to modify appointments that match the selected indicators.

Locking an appointment from the back office

You can lock tasks and appointments in two main ways: programmatically or data-driven.

Locking programmatically

You can also lock appointments directly. Use the web service function mboc_updateAppointmentLocked to lock or unlock a single appointment. To lock or unlock every appointment linked to a given task, use mboc_updateTaskLocked.

Call this low-level function directly, or reach for one of the platform-dependent wrappers below.

Dynamics

In NAV/BC, you can use the function UpdateLocked or UpdateLockedFromId in codeunit 2087643 "DS Update Appointment Status".

SDK / CLI

The SDK and CLI can lock appointments and tasks too. For example, the tasklocked command locks or unlocks any task in your Dime.Scheduler instance:

dimescheduler tasklocked --help

██████╗ ██╗███╗ ███╗███████╗ ███████╗ ██████╗██╗ ██╗███████╗██████╗ ██╗ ██╗██╗ ███████╗██████╗
██╔══██╗██║████╗ ████║██╔════╝ ██╔════╝██╔════╝██║ ██║██╔════╝██╔══██╗██║ ██║██║ ██╔════╝██╔══██╗
██║ ██║██║██╔████╔██║█████╗ ███████╗██║ ███████║█████╗ ██║ ██║██║ ██║██║ █████╗ ██████╔╝
██║ ██║██║██║╚██╔╝██║██╔══╝ ╚════██║██║ ██╔══██║██╔══╝ ██║ ██║██║ ██║██║ ██╔══╝ ██╔══██╗
██████╔╝██║██║ ╚═╝ ██║███████╗██╗███████║╚██████╗██║ ██║███████╗██████╔╝╚██████╔╝███████╗███████╗██║ ██║
╚═════╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝

Dime.Scheduler 1.0.0
Copyright (C) 2022 Dime Software

--sourceapp The source app.

--sourcetype The source type.

--jobno The job's unique identifier.

--taskno The task's unique identifier.

--locked True to lock the task.

--sentfrombackoffice True to mark the appointment is sent from the back office.

-u, --URI Required. The base URI of Dime.Scheduler.

-c, --user Required. The Dime.Scheduler user's email address.

-p, --password Required. The Dime.Scheduler user's password.

-a, --append (Group: action) Append the record to Dime.Scheduler.

-d, --delete (Group: action) Remove the record from Dime.Scheduler.

--help Display this help screen.

--version Display version information.

Locking with data

When you update an appointment from the back-office application to Dime.Scheduler, you can change its indicators. Every change is reflected immediately, which makes the data-driven mechanism reevaluate. This makes it easy to create an indicator such as 'Locked' and assign it to a limited group of authorized users, so the appointment won't accidentally be updated without permission.