All Ubidots accounts begin with a single App which can be accessed by users under a specified permission role to view, create, or edit resources within it. Here's a quick reminder of Ubidots' hierarchy:
Ubidots License Admin: A person who manages the Ubidots account at industrial.ubidots.com, its app(s), devices, dashboards, events, organizations, roles and users. Ubidots accounts may have one or several admins.
App: An IoT portal that contains organizations and is defined by a set of configurations for its appearance, domain, locale, visible features, and language.
Organization: An entity containing devices, dashboards, events, tokens, and users. Users may have permissions over one or multiple organizations.
Role: A group of permissions which specify the type of access (create, view, edit, and/or delete) a user has over the entities contained in the organization(s) they belong to.
User: A password-protected account that has access to one or several organizations through an app, and engages with them based on the particular role that the user has been given.
Given that end users may belong to one or more organizations, this article explains how to give them permission to create, edit, and manage the organizations they belong to. Please check these other articles to get familiar with how organizations, roles, and users work:
Requirements:
An active Ubidots account with an Enterprise license or greater.
1. Create or edit a role with organization-management permissions
In order to allow users to manage the organizations they belong to, you'll have to create or edit a role and enable the corresponding permissions.
Go to the roles' list under the "users" tab. Select the role you'd like to edit or create a new one using the upper right “+” button.
In the permissions section, select the organization management permissions that users with this role should have. Save the changes by clicking the green check mark button.
2. Create or edit an end user with an organization-management role
Now that the manager role has been created, you have to assign this role to users that will be performing these privileged actions:
Go to the users' list under the "users" tab. Select the user you'd like to edit or create a new one by clicking on the "+" button, located in the upper right corner.
In the "select role" step, select the manager role you just created/edited. Finish the creation process, or save changes, by clicking the “save” or "next" button, respectively.
When creating a user:
When editing an existing user:
IMPORTANT NOTE: Users with an organization-management role will ONLY have permissions over organizations they belong to.
2.1. Setting a default organization
Finally, remember to specify a default organization for the end user. This allows our system to know where to assign resources created by the end user.
Although an optional step, this is especially important for organization management; if an end user removes a resource (device, dashboard, etc.) from an organization, then it will be automatically assigned to the end user's default organization. If none is specified, then the resource will be freed and unassigned from any organization, becoming invisible to the end user — though it would still be visible by the account admin.
To set a default organization, simply click on the "edit" button of the end user and select an organization using the dropdown menu:
3. Managing organizations as an end user
Once logged in as an end user in your application, you should see the “users” tab in the navbar, with the option "organizations":
From this view, the user will be able to create, edit, manage, or delete existing organizations based on the permissions you provided. It follows the same flow as creating/editing organizations from the admin account:
Finally, in order to add devices, dashboards, or events to an organization, go to the respective organization, select the resource you'd like to add, and then click on the "+" button in the upper right corner:
Note that the resources listed are only those belonging to all organizations the end user belongs to. Once added, they will be moved from their original organization to the one being edited.
You can further filter what your end users get to see or interact with in the app by using tags. Users can only see in the app the entities (dashboards, devices, reports, events, and users) that they share a tag with. Learn more about tags here.