I would expect this would be easy but I can't seem to figure it out. Simple problem. I want to restrict access to a Drupal view as follows:
Only current users who are members of a custom role may access the view
OR
The view only displays content that is authored by the current user
The latter is easy, but restricting via current role is more problematic. Thoughts?
When you're looking at the Views admin screen (admin/structure/views/view/YOUR-VIEW/edit), look in the middle column and you should see an 'Access' option under the Page Settings heading. I believe by default it's set to Permission | Views Published Content; however, if you click Permission, you can then change this to Role, and select the desired role(s) that should be able to view this content. Hope that makes sense!
Related
The question is about the custom visualforce page in Salesforce. The page is created for getting contacts, opportunity, loans all are at a single dynamic link on the account named "Manage portal Access" Which comes under "Customer Portal Access" Tab like details and related list under "Account" Tab.The page was created to Manage the customer account, contacts and opportunities relationship. The page contains Email, Role, Last Login and a Toggle button as "Enabled".When this toggle button is enabled, those users have access to this portal relationship. It has respective apex class also.
The task here is, the toggle button can be enabled/disabled by some users, this want to be changed here by providing Read only access and assign two permission sets for edit access on this portal enable/disable.
" As a user I want Read Only Access to the portal tab. I want to be able to view all information on the tan and click through any dynamic links, but not be able to toggle the portal enable or un-portal enable any contacts. All Salesforce users should have a minimum of read only access to the Customer Portal Access Tab. The two permission below currently and should continue to provide edit access to the customer portal access section.
Create Customer Portal User
Document Manage Portal Admin "
Whether there is any customization option like providing access to objects in Salesforce through (Layouts, Fields FLS, Validation Rule)?
Or
-This can be achieved only through code on Visual force page and it's respective apex class, if this is the case how can I do it, whether there is any certain command or method for providing access or through controller class?
The "normal" object permissions (Create/Read/Update/Delete) and field level security (Read/Update) can be referenced in Visualforce. Something like this might be enough for you:
<apex:commandButton disabled="{!$ObjectType.Contact.fields.Role__c.updateable}">
Check the DescribeFieldResult in Apex reference. There's also something mentioned in VF developer guide but it's bit hidden and not as detailed: https://developer.salesforce.com/docs/atlas.en-us.234.0.pages.meta/pages/pages_variables_global_objecttype.htm
If you need more control than just whether field is editable or not - maybe look into Custom Permissions. They're your own checkboxes you add to Profile/Permission Set and you can check them in pure VF too, no apex required.
So... you decide. If most of the page is supposed to be identical, "just" about the button being enabled/disabled (or maybe even not rendered at all) - it's best to put the condition in the button. If it sounds like you need 2 different layouts - having 2 big blocks of code and one or another rendered might be cleaner to maintain and test.
P.S. Remember that good tester can activate the button using browser's developer tools. You should make similar "is field accessible / is custom permission assigned" check in Apex that runs on button click.
This is my first time looking at Dot Net Nuke. I have a customer who set a page to only be visible to unregistered users. It will not show up when signed in as an administrator.
About Us showing up as a guest/unregistered user:
About Us not showing up as a registered user/administrator:
I am able to copy the page, but can't place it at the top since the original page already exists. I was trying to find a way to edit the database to undo the permissions changes but haven't been successful at that.
If you login as a super user, you should be able to go to the Pages Persona Bar item, select the page in question, and edit its permissions. You can edit any page from the Persona Bar's Pages item.
If you are using an earlier version of DNN, you can use the Admin, Page Management page to accomplish this.
Currently the list component just shows all items (links) but I'm trying to find a way to hide a certain links, based on the logged in user role.
It seems that [Plugin:Equals] and [Plugin:NotEquals] tags allow us to conditionally show/hide the links, so I think this is probably the approach can try. But when it comes to getting the user access role/group info, I feel a bit stuck.
For now, I am only able to find the following fields that are available for use:
${wp.user.cn}
${wp.user.sn}
${wp.user.uid}
${wp.user.preferredLanguage}
And the online document doesn't say much either. https://www.ibm.com/support/knowledgecenter/SSYJ99_8.5.0/dev-theme/themeopt_el_bean_user.html
So is it possible to get the assigned user access group via wp.user? Or perhaps there are other ways to show/hide the links in the list component?
Not via wp.user you would need to use the access control model, but would be better using the attribute based security
WCM Security will hide any links the current user doesn't have access to - be it a Site Area, Content Item / Link. Check your security on the objects which shouldn't be showing. You'll most likely find you haven't restricted access.
I have been following the salesforce Recruiting App tutorial, and reached the section on creating a public site:
http://www.salesforce.com/us/developer/docs/fundamentals/Content/adg_composite_app_public_sites.htm
I have built a simple page to display open jobs as described here:
http://www.salesforce.com/us/developer/docs/fundamentals/Content/adg_composite_app_create_public_jobs_try_it_out.htm
This is displaying the open jobs correctly when I view it through our "internal" URL: https://c.ap1.visual.force.com/apex/PublicJobs
But when I view this same page through our "external" URL: http://servian-developer-edition.ap1.force.com/careers, the page still renders, except that now the list of jobs is empty.
I don't think this is a permissions error, as if so it would surely prompt me to log in. What do I need to do to make the data show on the "external" URL?
Make sure the "guest" user for the site has Read permission for the Positions object on its profile. You can't access the profile for the guest user through the normal Profile list page in Setup; instead, click on the Public Access Settings button from your site's detail page. On the profile, go all the way to the bottom of the page and make sure the Read permission is checked. If its still not working, ensure the Field Level Security settings also correct for that profile. The FLS settings are controlled about mid-way down on the same page.
In addition to above, ensure the object, if it is a custom object is in "Deployed" status. This fixed the issue for us.
Additional Information (from help.salesforce.com):
While developing a custom object or external object, you might not want users to see and interact with it. Because users might get frustrated with changes in layout or lose data when you delete custom fields, control visibility of the new object until you are finished.
Use the Deployment Status setting in the object definition to control when users can see and use the object and its associated custom tab, related lists, and reports.
Choose “In Development” as the Deployment Status when first creating your custom object or external object. Doing so hides it from users while you are designing and testing it. Only users with the “Customize Application” permission can see the object tab, search results, related lists, and report data types.
Change the Deployment Status to “Deployed” when you want to allow all users to use the object and any associated custom tab, related lists, and reports.
If you make more enhancements after deploying a custom object or external object, you can change the Deployment Status back to “In Development.”
I was working one of the force.com coockbooks. I created a Mileage object and addes some features like workflows and etc (This is done after I log on as an admin in my developer force account). I then created another user(Standard user). And I wanted that user to use the Mileage object to create new Mileage. However, Mileage tab is not visible. I tried by making it visible to all users in Create Apps. But, still it is not visible (as a tab) to my new created user.
How should I make Mileage tab visible so that the new created user can use Mileage tab to create a new record?
Thank you.
To ensure a non admin user has rights to access the object-tab you're creating, you should:
Verify that the user's profile, as a minimum, has read access to the object (go to user's profile's setup screen and verify the "Custom Object Permissions" section)
Ensure that the object you're displaying in the tab is "deployed" (This is a simple property on your custom object definition called "Deployment Status")
In addition to these suggestions, it could be that the tab is hidden to the user. This could be taken care of as described in Ralph's answer.
There are two things you'll want to check
First, make sure the tab is visible to the profile you're logged in as. From documentation (login may be required):
Click Your Name | Setup | Manage Users | Profiles.
Select a profile.
Depending on which user interface you're using, do one of the following:
a. Enhanced profile user interface—In the Find Settings... box, enter the name of the tab you want and select it from the list, then click Edit.
b. Original profile user interface—Click Edit, then scroll to the Tab Settings section.
Specify the tab visibility.
(Original profile user interface only) To reset users’ tab customizations to the tab visibility settings that you specify, select Overwrite users' personal tab customizations.
Click Save.
This may take care of it. If the tab still isn't visible when you're logged in as the new user, click the '+' at just after the last tab and then click 'customize tabs'. Select the new mileage tab and add it to your app.