I have statistical data I want to show it for users. I need only options to read (single and list view) and delete. How to disable the possibility to Create and Update?
in the CrudController "setup" method needs to add $this->crud->denyAccess(['create', 'delete']);
Related
I'd like to limit the types of Work Items a user can create.
For exemple, on the same project, TEAM A can create Epics, Features, Pbis and TEAM B can only create BUG.
How ca I do that ?
You cannot. It is not possible to restrict access to work items on a type-by-type basis; if a user can create a work item, they can create all types.
You can do that through the process customization. You can add a new group (like DenyCreateSomeWIs) and add users to it. Then update needed work item types with rules "Restrict the transition to state":
As a result:
Check the documentation: Apply rules to workflow states (Inheritance process)
I came up with a workaround for this.
Create a group for the people whom you do not want to be able to create a work item type.
On the work item rules, create a rule that makes the title read-only for members of that group. When users are a member of that group, they will not be able to save that work item without a title.
What is the best approach to hide general ui options from certain desk users with lower permission roles? I would for example like to block the create workspace feature (and hide the button) for a certain user role:
Ideally I would like to also hide certain options from the following pane for certain user roles.
What would be the best approach for this. I am thinking of writing some javascript code to manipulate the dom here, but I am wondering what the best way would be to inject something like this and if it is possible to selectively inject that code in frappe framework via a custom app.
I'm in the process of recreating the Work Item creation UI in my web app. The UI includes a lot of drop down menus. My choice right now is either to hardcode all of the options available, or retrieve them and dynamically populate. I would like to populate them dynamically, but that would require me to retrieve the possible options for each drop down menu. Is there a way to retrieve these through the API?
There's no direct rest api for this. If you want to retrieve the possible WorkItem types in current project, you should 1.first get the processID of current project and then 2.list the WorkItem types in specific process.
If you're using rest api like your tags above: You can consider using Processes-List to get the processID and List Work Items Types to get the available WorkItem types in one project. We can't do that directly in one api, no matter rest api or client api.
Just to follow up on this:
This document answers the question:
https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work%20item%20types%20field/list?view=azure-devops-rest-5.1
We can retrieve the allowed values for our field through the API query GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields?$expand={$expand}&api-version=5.1
My issue now is that the allowed values for one of my drop-down menu depends on the value of another. For instance, if I selected X in one of my drop down menus, the allowed values for my other drop down menu changes dynamically. I'm not sure how to handle this using the API.
I'm wondering what the best way to disable editing and inline-editing for a single record in SuiteCRM/SugarCRM. I am familiar with how to remove the edit button from the dropdown menu when looking at a detail view record (although it still allows the inline-edit capability).
I am also familiar with $dependencies and making a specific field disabled under certain conditions. But I am looking for something that allows me to programatically type in an ID of a record within a specific module, and automatically no user would be able to edit that record (no access to edit view, and no inline-editing).
How would I go about introducing that feature?
For SugarCRM use following code:
$dictionary['module']['fields']['yourfield_c']['inlineedit']=false;
OR use dependencies
For SuiteCRM use following code:
$dictionary['module']['fields']['yourfield_c']['inline_edit']=false;
I need to save a form's current state and restore it while i am navigating between them. I am using FormManager class to navigate between form's. Is it possible to do that with memory handled efficiently?
bada Allows create up to 30 forms per application. You can use Frame::SetCurrentForm to make desired form active. But as i see you want have exactly one physically existing form at the time. Imho common mechanism to saving some state is not exists ( by the way what exactly states you trying to achieve to save? ).
You can try using some own (depends of what exactly you need) user-define format such as some template-based collection from Osp::Base::Collection