Hide report or hide search icon for user - dynamics-business-central

Is there a way I can hide a report for a particular user in business central cloud. Or just hide the search icon for the user. Thank you

You can make use of the Permission Sets. Here is how:
Copy the permission set where the user currently belongs to.
While on the permission set add your object as report and key in your report
ID(as below) and set execute permission to indirect.
Now go to the corresponding table object, and set the read permissions to
indirect.
In my case, I wanted to restrict the report on chart of accounts, so in my permission set I added my report ID with execute permission as indirect. Then added the table G/L account with read permissions as indirect.
With this, the user will see the report but won't be able to run it.
The alternative is to create a boolean under user setup and add a control on the report that it only runs when the boolean is true for that user.
You can read more on another scenario here: https://community.dynamics.com/business/f/dynamics-365-business-central-forum/421079/removing-access-to-pages-and-reports-from-permission-sets

Related

Login with different accounts

I am trying to create my application with Google app maker and Ineed to create login with different accounts? how can I create a login with different users roles and each user has a specific pages to see
There's a simple way to do this. Please click on the links in my answer below to go to the screenshot I've added for reference.
Go to App Settings -> Security and add roles you would like to create for your app in the space provided.
In a page, you can go to the Property Editor, scroll down to Security and mention who can see this page.
In a model, you can add controls by going to the Security tab and selecting relevant roles for specifying who can create, load, save or delete records for that model.
Finally, to mention which email address goes into which role, you can go to a specific deployment and add the email addresses for each role manually.
Let me know if this helps. Feel free to ask any questions you may have!

How do I add field values to the `drush user-create` command?

I have been Googling this, read the drush documentation and searched StackOverflow, but I can't find an answer to this question.
I currently use drush user-create someone#example.com --password="somepassword" to create a user.
Then there are drush commands to add a role, block the user, etc. But nothing on adding/updating fields.
Does someone know how to set a custom user field to a created user, or immediately create a user with field values (for Drupal 7 that is)?
I need to do it without answering commandline questions.
You need a custom Drush command which accepts the arguments like UID and field values.
https://www.chapterthree.com/blog/how-to-create-custom-drush-commands
https://drupalize.me/videos/passing-arguments-drush-commands?p=1134
All commands in user: (user)
user-add-role (urol) Add a role to the specified user accounts.
user-block (ublk) Block the specified user(s).
user-cancel (ucan) Cancel a user account with the specified name.
user-create (ucrt) Create a user account with the specified name.
user-information Print information about the specified user(s).
(uinf)
user-login (uli) Display a one time login link for the given user account (defaults to uid 1).
user-password (upwd) (Re)Set the password for the user account with the specified name.
user-remove-role Remove a role from the specified user accounts.
(urrol)
user-unblock (uublk) Unblock the specified user(s).

Error Changing Value (Excel to CI PeopleSoft CMS)

In the PeopleSoft Campus Solutions module, I am using the ADM_APPL_ENTRY1 Component Interface (CI) to fire some data.
The user account I am using is a clone of the PS user (i.e. full permissions). I tried with both my clone account and the actual PS account but it returns the same error {ADM_APPL_ENTRY1.ADM_APPL_PROG.ACAD_PROG}(91,34).
I double-checked security and found all permission lists and progr security are the same for my user. Can anyone help?
Looks like you need to set the row security for your user (which is not copied when you copy the PS).
If you want to, you can manually copy PS row level security on your user on:
Define SACR> Security > Secure Student Administration>Setup>User Security Replacement.
Enter your user on the search page, and enter PS on the page itself.

What are the ways to notify user that he does not have permissions to access a page?

What are the ways to notify user that he does not have permissions to access a page?
What I already started is that I made an error page with "no permissions" message and user will be redirected if he does not have permissions on this page.
I don't know if this is the official or the best way.
Another place that what should I do in the UserControl case, for example, when I have a user control to browse the employees and I don't want to prevent the user in everytime the user control is used. I would prefer to process the permissions from one place (inside the user control's code).
Any ideas will be approciated.
Thanks.
I would suggest you make a custom page and redirect the user to that page if that user is not in certain role...
Put this condition in master page:
if (!(HttpContext.Current.User.IsInRole("Admin"))
{
Response.Redirect("UnAuthenticatedUser.aspx");
}
You have many options including:
Option1: Redirect user to a page that you have created for such purpose ..
Response.Redirect("ErrorPage.aspx");
Option2: Throw an exception then handle it in an appropriate way..
throw new Excepion("Exception Message");
I usualy set the value of the Visible property for the control that user does not have permissions on them to false .
You can use the authorization section in the web.config
It would all depend on how fine grained your permissions are. Based on permissions set, sometimes it may not make sense to show the entire page while other times, you need to disable and/or make readonly and/or hide part of UI. For example, lets say, there are two permissions, view user details and add/edit user details. So if view permission is not present then navigating to user details page, one should redirect user to a common error page stating something like "Insufficient Permissions". On the other hand, if view permission is there but no edit permission then one can see user details but button/links such as Edit/Detele should be hidden/disabled (or you may show user details in read-only format etc).
Typically, I prefer to fetch entire user permission set on login and cache it into application wide context classes (generally user specific context gets backed by session state). The permission set would have methods to check against specific permission. Then the base page (all pages would be derived from one common base page - intermediate base pages are possible for different concerns) would check if view permission for the page is present (the permission is obtained via a virtual method that interested page overrides to supply) and if not then user is redirected to common error page. Adjusting specific UI as per permissions is left to the individual pages (although there can be cases where pages may have common templates and even share that piece of code via another base page).

iCal for authenticated users

I am using the calendar module with its iCal support for Drupal 6. I have made my event type which appears on the iCal feed. However, I want to make the event content type private, so only authenticated users can read it. By doing this they will not show on the iCal feed. Is there any way that I could get the iCal feed to still show these events?
I agree with calebthorne that normally a feed is public; I can understand the need of making a feed public for a group of users, and not to the anonymous users.
If the feed is created by a view, then you can change the view, and restrict its access to the users you want.
As you can see in the screenshot, you can restrict the access to the users with a particular permission, or to the users with a specific role (authenticated user is one of them).
Hmmm... I would give the Node Access module a look. I use this module to restrict access to content based on content type. I have never tested whether this works in conjunction with the Calendar module but it is worth a shot.
Some more details about the Node Access module (from its project page):
Nodeaccess is a Drupal access control module which provides view, edit and delete access to nodes. Users with the 'grant node permissions' permission will have a grant tab on node pages which allows them to grant access to that node by user or role. Administrators can set default access controls per content type, and also define which roles are available to grant permissions to on the node grants tab.
The upshot is, this module allows you to do things like 'node 123 can be viewed by authenticated users and edited by admin users and joeuser'. As an added bonus, update and delete permissions are separated, so you can make sure users with edit permissions cannot accidentally delete pages.

Resources