Jump to content

Search the Community

Showing results for tags 'roles'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 3 results

  1. Hello Caspians, I just wanted to share my case: I have a Submission Form with Authentication (users can have access levels 1,2 and 3). In it, I have a Dropdown where user can choose to which department (role) to assign the issue, but I want that each logged in user can choose department which is only on his or any lower level. So, user which is on level 2 can see only options that have stamped on them level 2 and 1. User with level 3 can see any option with levels 1, 2 or 3. We will need 'users' table with levels, and 'Roles' table with their mapped maximum level access:: In Submission Form, we will need to set up the Dropdown field as follows, as well as additional Virtual Field with Dropdown Form Element (Virtual Field will be hidden with JavaScript, but in order to hide Label, select 'No Label' from Advanced Options): Once this is done, add another HTML block, and add the following JavaScript code in it: <script> document.addEventListener('DataPageReady', function(event) { const userLevel = '[@authfield:Level#]' // Select you own Authentication Parameter for User Level const dropdown = document.querySelector('select[name="InsertRecordAssigned_Departmant"]'); // Select your own Dropdown Field const helper = document.querySelector('select[name="cbParamVirtual1"]'); // Select Virtual Field helper.style.display = 'none'; let optionsMap = []; const arrayHelper = Array.from(helper.querySelectorAll('option')); for (let el of arrayHelper) { optionsMap.push({ 'level': el.value, 'type': el.textContent }) } let getOut = []; for (let i = 0; i < dropdown.length; i++) { const find = optionsMap.find(({ type }) => type === dropdown.options[i].value) console.log(`find level: ${find.level}, type: ${find.type}, user_level: ${userLevel}, option: ${dropdown.options[i].value}`) if (Number(find.level) > Number(userLevel)) { getOut.push(i); } } getOut = getOut.reverse(); for (let i of getOut) { dropdown.remove(i); } }); </script> Adjust declaring of variables at top, to select your Authentication Parameter for User Level, Dropdown Field (Just this need to be changed: const dropdown = document.querySelector('select[name="InsertRecordAssigned_Departmant"]'); ), and for Virtual field.
  2. I have a lot of tables with the company field. Nowwhat I am looking for is an authorization mechanism allowing users to see only some companies. But I have two issues: 1) If I look into row level restricions I have this scenario: Some users should see onlt companies A, B, C; others shoudl see B, C, D; others hace to see A, D, E, F and others all companies. I read this Restrict Access to Data by User or Role but it seems very poor because it do not seems roles restriction, rather a data partitioning where each partition is allowed to some users. This bring up to a some limitations in others scenarious and a huge amount of data handling when users changes roles. 2) If I look into user roles restriction I do not understand how assign mor than one role to a users. In the artivle I mentioned before I seems to me that roles are implemented with DIFFERENT LOGIN SCREEN. I think tihi is a misunderstanding of mine, because this is not roles handling. This is multiple access. Let me make an example: You go into a PUB where room A and room B are reserved for two different parties and the remaining place is for everyone. Very likely you will enter in ONE pub entry and then you'll find a PUB clerk that after asking your name, check if it is on a party list and address you in the proper room or in the public ones. This organization DO NOT CHANGE even if there are more parties or none, the only thing changing is the clerk list (role assignment list). INSTEAD I have understodd that in CASPIO the PUB should open and briklayer doors according parties it hosts! It seems very strange to me develop a new loging page for each roles and instruct users to change login page for each role they have..... I miss something? How can handle overlapping roles and more inportant how can handle user's roles changes without changing data into all tables?
  3. I am trying to determine the best way to handle multiple roles per user in one database. Example: Multiple applications use the same "users" table for authentication. One user may be a manager with elevated rights in a request database, but may be a requestor in say, another application to submit an expense report. Is it better to have the "users" table and the "roles" table joined as one to many to a third table, or to have a "roles" table per application? Thanks.
×
×
  • Create New...