allow anonymous to create page - drupal-6

I have set permission to allow anonymous user to create page.
but when the anonymous user submmited the page, drupal 6 responded "page not found".
i have checked drupal backend, there was no page created.
so my question is, which permisson option i have to set to allow
anonymous user to create a page.

I had the same problem right now and it drove me crazy! After a bit researching I did a try rebuilding permissions at /admin/content/node-settings after remembering that this solved such issues related to node access for me before.
I am a senior developer and Drupal developer for about 4 years and until now I don't know why this happens. Who knows a clarification to all of this please please share..
http://drupal.org/user/642644

Anonymous users can create content if you give them permissions in the back end. Go to yoursite.com/admin/user/permissions and make scroll down to the "Node Module". Make sure you have "access content" and any relevant "create **foo** content" boxes checked (where **foo** is the content type you want them to be able to create) for anonymous users.
This will grant anonymous users permission to create content of type **foo**, and view any content created.
Your "Access Denied" problem may be caused by anonymous users being able to create content, but not access it. This would be the case if you have granted "create **foo** content" permissions to the anonymous user, but have not given them "access content" permissions. Can you see the content while you are logged in as an admin?

Not super familiar with the tech you're using but can a registered user create a page? If not, the problem probably is because of something else. :)

Related

Magnolia CMS 5.5.5 deny access to some dam-Files

I got users and roles. Access to certain parts of the the content is denied in the ftls but I got the following problem:
I want prevent users from sharing pdf links.
These are formed like this:
http://localhost:8080/dam/jcr:c383c3c-a27a-4baf-856f-265baaf02142/mozillasecure.pdf
In the dam workspace I have two folders pdf and pdfsecure I want the pdfs in the pdf to be downloadable for all roles and the ones in the pdfsecure folder to be denied for ie. anonymous role..
How can I accomplish that?
Note: I thought about extending the DamURI2RepositoryMapping.java but I couldnt see it through, please help...
Is this a trick question? :)
Simply set content permission for anonymous role to "deny" on pdfsecure and subnodes via security app. Make sure to set it directly on public instance (author and public have different anonymous role configuration so you don't want to activate that).
Setting permission on the content level, in difference from setting it at URI level, makes sure content is not accessible via any URI.
HTH,
Jan

In Kentico deny access to a single page unless a use is in a particular role

I've been wrestling with uniquely restricting one page in my Kentico installation to be viewed by only two Roles, everyone else should be redirected to a page telling them they need to jump over the paywall. I've not determined the best way yet to do this. Along the way I've found that when I try to access that page from the menu at the top of the page it respects my permission by denying access. However when I use that same link from an editable web part lower in the page it seems to ignore permissions. While it looks like two questions here what I really want to know is how to deny access unless a user is in a particular role and then if denied how do I redirect them to a page to explain why they were denied. Thanks.
Try this:
From your top level page (master page), add the role "Everyone" and grant them read access. This will replicate through the rest of the pages and everyone can see everything. Yes, sounds fishy but read on...
Next navigate to the specific page you want to restrict access to. On the Security tab, click the "Change permission inheritance" link. Then click the "Break inheritance and copy parent permissions". Next select the Everyone role and check the Deny full control box.
Now add your specific role(s) and set their permissions to Read.
This should get your permissions working as you want for that page.
As for a message and redirecting if in a particular role, you could place a webpart on a page and say if they are not part of a role, just redirect them to a page using your choice of redirects. The webpart itself will handle if they are in the particular role. Keep in mind the user will have to be logged in already and/or have access to that page so no restrictions can be on that page.
Thanks for all your suggestions. Here's what I found. First, the reason the two pages were acting differently was a brain cramp on my part. I had embedded two different links. My bad!
Secondly, on security, it appears that Deny takes precedence over Allow. If the role is denied no amount of "allow" will override the denial. The way I fixed the problem was to create a zone for those who I wanted to allow access to the text and a zone or web part for those I wanted to deny. In the Zone visibility section (click the arrow next to "Visible" to enter text) I put a boolean statement:
{% CurrentUser.IsInRole("Member") || CurrentUser.IsInRole("SecondRoleToTest") #%}
This way anyone who was in either of those two groups would cause a true value to this statement and visible would equal true (notice the"!"). For the zone or web part I wanted to present to those who was not a member of either of those to groups I put the opposite of that condition
{% !(CurrentUser.IsInRole("Member") || CurrentUser.IsInRole("SecondRoleToTest")) #%}
and it would display the materials for those who were not in either of those groups. In this case the text read the equivalent of "you need to be either this or that with a link to information on how they could become this or that". Have to admit I learned quite a bit on this one. Thanks for all your help, you helped lead me to the answer.
If I am understanding you correctly, you are saying that you have locked down a page to only 2 roles? If a person clicks on a navigational link that is not in those roles, they are denied access...correct? But if a person clicks on a link from a webpart on a page, they are not denied access...correct?
Where this is unusual I am also wondering how the link is setup in the webpart? Is it just a anchor link or are you using a Kentico permalink? These should not behave any differently, but just a thought. Sounds like more than likely there is some permission that is still allowing access to the page, but without seeing your actual permissions setup it is really hard to tell you what could be causing that.
As far as redirect, by default it should redirect to a login page if you have one of those setup (you would of set that up in the Settings Tab), otherwise the access denied would just happen. You could quite easily write some custom code to redirect users who are not into a role to another page. For re-usability, you could write it into a custom webpart and have a property for the roles the users need to be in and a property for the redirect page location and then handle it from there. Doing it that way would allow you to use the same pattern on any pages you desired...but you would then need to bypass the built in security lock down stuff.
Lastly (and I don't know the classes to use) you could probably override what happens when 'access denied' occurs in accessing a page in the site..then you could do your own custom redirect. I am sure someone else can chime in with the exact class.

How to allow a user with read access to respond to a Sharepoint 2013 Survey?

How to allow a user with read access to respond to a Sharepoint 2013 Survey ?
I have tried with the read access only, but its not able to get the "respond to survey" link. I have also tried the "contribute access" option also and this time, I have got the button "Respond to Survey". When I tried to fill the survey details and click submit, I'm getting an access denied error message.
You cannot add items to a list (usually what is meant when you say "respond to a Sharepoint survey") with only Read permissions. Users will need either Contribute permissions or a custom permission level that includes Add Items. It is also important to distinguish the site or list that you're setting permissions for: when you say that you have "contribute access", you may only have set Contribute permissions for your site. You need to set it for the list that contains the survey results.
Lists usually inherit permissions from their parent sites, but it is often prudent to stop inheriting and set custom permissions on lists (like surveys) that everyone will need to contribute to. That will keep users in other directorates/groups/teams from mucking with the Shared Documents library (and many other things) of whatever directorate/group/team is hosting the survey.
Lists can be set up to handle access requests so that the "access denied error message" you received will include a link to request access. This may be a feature to consider on your survey to simplify the resolution of future permission errors.

Restrict users to view a particular page in sharepoint

i have a sharepoint site http://spp/sitepages/page2.aspx
I have a group called "Group1" with full control. There are two users "User1" and "User2".So both the users will have full control and both of them can make any changes in page2.aspx. Now this is my requirement, i want to allow only "User1" to access, when "User2" access my page i want to show "Access Denied" is it possible without code.
Since we can't vote to close towards sharepoint.se yet, here it goes:
You need to go to the SitePages library in the browser, select the page you want to change permissions and then go to the dropdown menu for the item > Manage Permissions > Edit Permissions (Stop Inheriting), remove all users / groups and only add User1 to the item.
A more detailed guide is available at the Microsoft Office website online
If you can put your page into a document library - do so. This way you can adjust your permissions properly with no code.

Site members/visitors get access denied error page because of webpart

I`v developed custom webpart. I can add it to page and site owners can view page with no problems.
However Site visitors/users get redirected to access denied error page. Sure, I must be doing some stuff normal users are not allowed to.
But the thing that bugs me is that when I place breakpoint in webpart constructor or even variable declaration it won't get hit! (If i try to view page with limited privileges). But in my browser, I get the access denied page. However, if I close that webpart, I instantly have access to that page and everything is OK.
What's the catch here? I was hoping I could catch exception with debugger to see which statement is guilty one, but it seems webpart doesn't execute any code and I get that exception.
Edit: Sorry, turns out debugger now hits those breakpoints. Don't know what changed, because symbols were loaded.
What is the trust level at your Sharepoint site ? You might want to give Fulltrust temporarily to see if you have any access problems.
If yes, then you might have a Code Access Security (CAS) problem on your hands. My first instinct is that your assembly does not have neccessary privilages to run correctly for normal users.
You can configure it using custom CAS entry in the manifest.xml for the webpart, e.g. if you are calling external resources then you might have to configure System.New.WebPermission and define which url you are allowed to access. You can find more info on this at the U2U site.
Also what does your webpart do ? If you are trying to access resources which normal users don't have access to (e.g. a list in some site) then you have to use the SPSecurity.RunWithElevatedPrivilages method, so that you have the neccessary privilages (be careful to create new Site instance within that method so that the Context populates correctly).
Found the solution.
Turns out that i wanned to determine if user belongs to a specific group by trying to access that group users. As this was impossible if a user doesn't have such a permissions, it was throwing some kind of internal exception with message
"Unable to evaluate expression because
the code is optimized or a native
frame is on top of the call stack."
Anyways, i now learned to loop through SPUser.Groups (SPGroupCollection) and check if we have a matching group rather than enumerating group principals and seeing if he's inside.
You need to give permission(update personal webpart) to the visitor group. However, it is not recommended. If you want you can create a separate permission level and associate it with the visitors group.
Cheers!!

Resources