in my application, I would like to achieve multi access level for different users depending on their role. I am developing application in openUI5. When I log in to the application I know what roles user have. And according to that roles, I would like to display or hide certain links, tiles, gui components.
Multi access level I mean
displaying/hiding gui elements
disallowing routing to specified places in application
The point number 2. I have achieved. That's no problem - according to role, I add specific routes to allowed routes.
I would appreciate an advice for point number 1. what would be the best practice?
Thank you
Depending on the user's role (a set of authorization rules), you can control the UI in a following ways:
Huge differences in UI
If the UI should be VERY different depending on user role, it makes sense to implement different set of views created for each role or even apps.
A few "change points"
In case of not really much differences, you can set up the configurational JSON model, which will contain visibility rules for a certain UI element and you will bind the "visible" property to this configurational model. A set of rules can even be fetched from backend, so it won't be a hardcode on UI, which is pretty handly for customizing reasons.
User authorization + object state handling
It is also might be the case (very often in my projects), that not only user role has influence on the state of the UI, but the object's state or business logic should define how the UI should look like. I'm talkin about the things like:
should the filed be displayed or hidden; read-only or editable mode allowed;
should the action buttons be hidden/visible/clickable and so on;
should the any UI part be hidden/displayed.
In this case it's easier to let backend control over that by using so-called "field controls". They are simple properties in your OData entity type(s) (where needed), which hold the rules for UI.
For example in your entity type you have the field "Amount" and in some cases it should be read-only, while in some others - editable. So you need to add a field-control "UxFc_Amount", it should be integer type and contain 0, 1 or 2:
0 - means field should be fully hidden
1 - means field should be read-only
2 - means field should be editable
Then you bind appropriate properties of control, i.e. for Input control: "editable", "visible", "enabled".
For buttons you can introduce "action controls". Let's say you have a "header" object which is bound to the whole page and depending on user's role and the internal object state/status the "Submit" button should be available. So you introduce "UxAc_Submit" property which is a "boolean" (Edm.Boolean) and bind the "visible" property of the button to this variable, if it's false - the button will be hidden.
The same approach can be used for showing/hiding the whole sections on UI (for example when you use ObjectPageLayout control).
Related
What I'm trying to do is to recreate the "New" button in custom object's list views. The only difference between the existing standard "New" and the one I'm trying to create is that so I could control which recordtypes to show and which to hide. The 17 record types that I need to hide are being used to create records ONLY by using a flow. I have tried creating it myself and searching for similar codes but no luck.
I would suggest please use the out of box salesforce profile settings to control record type assignments.
For instance, lete say you have 3 record types A,B,C.
A,B should be visible to Profile 1
C should be visible to Profile 2
You can go to profile settings and Assign relavant record types for each profiles.
I am working on a form that is a combination of chatbot and dynamic form elements, that appear and disappear based on different validation events and selections. The form progressively shows the next step, with previous steps appearing like a user has "chatted" the answer.
As a lot of elements are being added/removed a lot of the time, the aria-live attribute is giving confusing information through the screen reader (e.g. a textbox will show up at the bottom of the screen like a chat message button for some fields, then disappear when the next selection are radio buttons).
As this new form is going to be launched as a beta test, we have a previous page where the user selects some initial values that will route either to this new form or to an existing form.
Is it compliant to WCAG AA standards to do one of the following options (or, other options that are not listed here):
Detect the user is using aria tags via a visually hidden, but aria enabled field, and change the UI to a traditionally structured form (all elements available, less dynamic inserts/removal) when the user focuses into the form
Use detection on the launch page to route the user to a different page that has the basic form, keeping the two pages separated
Provide options that the user can navigate to (menu, checkbox or otherwise) that allows them to toggle the form to change out of the conversation mode, and provide text that explains that this option would be best for screen reader users
The short answer is "yes".
See "Understanding Conformance Requirements"
1. Conformance Level: One of the following levels of conformance is met in full.
Level A: For Level A conformance (the minimum level of conformance), the Web page satisfies all the Level A Success Criteria, or a conforming alternate version is provided.
Level AA: For Level AA conformance, the Web page satisfies all the Level A and Level AA Success Criteria, or a Level AA conforming alternate version is provided.
See the definition of "a conforming alternate version". There are several requirements.
But, you cannot automatically switch to the alternate form. How would you know you need to switch? You can't check for assistive technology running, and even if you could, there are some users that would benefit from the simpler form that don't use assistive technology. You'll have to have a link at the top of your form that has something like "go to simpler form".
I'm attempting to build a dynamic property in the Property Pane of a React based Sharepoint Online Web Part.
In order to achieve this I wish to iterate through an array of data in the PP, to create multiple drop down fields. Currently I can only create drop down fields through individual variables, not arrays or objects (as these can not be iterated through in the PP render method). This means that I can only render a predefined number of drop down fields in the PP.
Microsoft have already achieved this functionality on their 'Highlighted Content' Web Part, but haven't published the source code for this, so I cannot see how they have achieved it. On this Web Part the user can add multiple PP drop down fields and remove these individually too, without limit (i.e. they are rendered fully dynamically).
Is this possible to do or am I taking the wrong approach?
[![MS Highlighted Content Web Part][1]][1]
I am using Knockout js. I have a view model that contains an array of objects and I want to allow the user to edit one of the objects using a wizard style interface. The issue I have is the wizard will show different steps depending on what choices are made. For instance:
If the user selects 'Yes' on step 1 then I display step 2a
If the user selects 'No' on step 1 then I display step 2b (ie. a different dialog form)
This goes on so that the paths through the wizard are not linear.
My question is do I bind all the possible wizard UI steps to the view model at start up even though some steps will never be shown and the bindings on some screens will be invalid (eg. step 5 may bind to viewModel.theObject.PropertyA.PropertyB.PropertyC() but PropertyB is still null at step 1).
A better way may be to bind to the UI steps as they are displayed but my problem is then there I am not aware of a good way to 'unbind' the model once the step has completed so I could end up with the step bound to multiple objects from the original list!
I think that a good way to do this is to have your view model be an array of steps and bind your UI to the "selectedStep". Then, each step can dynamically choose which template that it wants to use (like in this post).
Here is a rough sample of the idea: http://jsfiddle.net/rniemeyer/SSY6n/
This way the template bindings handles generating/binding/cleaning up the dynamic content based on whatever step is selected. If the steps are in an observableArray, then you could even dynamically add steps. Maybe you have a list of all of the possible steps and then have an "activeSteps" array that represents the steps that are currently valid based on the user's choices.
I can't quite figure out a work around for using "Use view dialog for choices" in a web based application.
My Question is how can i convert this settings in my field in the Control Tab then Choices, in choices "Use view dialog for choices" then Use current database and access view and a specific column.
Thanks in advance :)
"Use view dialog for choices" is almost always a way to get around the restrictions on the return value of a formula. For instance, you'd use it when #DbColumn in a choices formula for a listbox or dialog list choices formula would cause an error.
The upshot of that is that there's no "one-shot" workaround for the web. A direct functional replacement would be to open the view in a pop-up window or overlay div, and attach some JavaScript to the view in order to override the default web behaviour and force the return of values to a field on the main document. This approach will work well, but it may require server settings that allow the entire view to be served at once (the maximum lines to display per page will probably be less than you need), and it's subject to breakage if the HTML used to display the view ever changes.
You can use LotusScript or Java in a WebQueryOpen agent to populate a conventional widget (the list of a element) in a Rich Text field, either using PassThru HTML or a "Treat contents as HTML" form. That would involve getting the view, then doing a document-by-document (or category-by-category) run through the view index to get the column values you need. (If you take this approach, use the ColumnValues rather than the document field name to retrieve the values -- the cost of opening the document to read the values is high, and your code will take many times longer to run.)
You can also get the view as need using an AJAX request and a ?ReadViewEntries query, which will return an XML representation of the view. Again, you may have to have the maximum view lines per page limit upped in order to get the amount of data you need. You can get around that, though, by using a "suggest" method that doesn't begin retrieving data until the user enters at least one character into the field.
All of these approaches mean using a separate form for the web. That's easy enough -- you simply create a form with the same alias (or name, if you're not using aliases) as the one you're using for the Notes client. In the list of forms in Designer, you can use the hidewhen tab to hide one from the Notes client and the other from the web. (Note that you can create an additional form for mobile devices the same way if necessary.)
I can't get more specific than this with the information at hand. If this is insufficient to point you in the right direction, then edit your question to be more specific (and post a comment to this reply -- I don't spend a lot of time on SO, but I do spend time on other StackExchange sites, so I'll be notified).
Unfortunately, you have to develop it yourself.
http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=AJAX%20Name%20Picker
AJAX-based name picker is a good start I guess.