node privacy byrole in drupal - drupal

hi i have installed node privacy byrole module from http://drupal.org/project/node_privacy_byrole.when i enable this module some content displaying form from home page.but when i loged in every thing displaying as it was showing previous.
how can i resole this issue. although i have given the view permission for annoymus user

if i'm understanding you right your asking why when you log in you can see everything this is probably because you are logged in as the superuser or user 1 if you are not logging inas the first user you created try checking permissions for the user group of your logged in user

Related

drupal 7 user contact form access denied

We have a problem on a drupal 7 site. Logged in or anonymous users are not able to access other user's contact forms. Admins can access the forms.
We have set permissions to allow users and guests to access both the site wide and other users contact forms. Users can access the sitewide contact form.
If we give users permission to administer and edit all user accounts, they can view the contact forms. Obviously, we don't want to grant this access.
Any ideas to solve this problem?
This is a permission problem.
You have to set the permission to guest users to see this form.
In Administer - Users - Permission.
Regards.
Go to People - Permisions, find a module "User", find a line "View user profiles" and set permissions there for your user roles.
17/11/2014.
I had the same problem.
Go to:
Modulos-> Contact(Module) -> Permission -> In the column "ANONYMOUS USER" pick up -> "Administer contact forms and contact form settings", "Use the site-wide contact form", "Use users' personal contact forms".
It's works perfectly.
I also had this problem. Feedback from anonymous users through contact form always returned "Access denied".
From the logs it turned out seckit module was blocking form submission with the following error "Possible CSRF attack was blocked." All I did to get the contact form working again was to comment out the "Base Url" in Drupal setting which I added earlier on.
We ran into this issue recently when testing some changes, and permissions were correct, but it turned out that any 5 submissions from the same IP address resulted in an "Access denied" message for an hour (unless logged in as an admin). This was a result of Drupal's core but hidden flood control/limit settings (to prevent spam/bot activity).
Workarounds we found (if necessary, though we just ran into the problem while testing contact forms more than normal) were either to change the default allowed submissions/time in settings.php by adding lines like the following (for example):
$conf['contact_threshold_limit'] = 10; # limits to 10 submissions from same IP
$conf['contact_threshold_window'] = 1800; # reset flood after 1800 seconds (half an hour)
or to install the Flood control module, which provides a handy GUI for changing these and related settings (i.e. login attempts) without having to bother editing settings.php (which would take precedence, I believe).

Drupal 6 - Content profile and user management

I have developed a system using Drupal 6. I have implemented user registration with content profile. Which means there is a functionality called company registration. It is creating a content profile with companies and a user account also after click register.
Once the profile and user account created both will be in pending status and I have implemented a functionality where the site admin can approve (using rules.) Once approved the content profile is accessible via front end.
But though the users status change rule is written (rule to change the pending user role to active member) the user is unable to login. Currently after approving the content profile the admin again need to go to the user account and activate it.
Can anybody help me to get this resolved please?
My advice would be to use Triggers with this, so that when a content profile is approved, the linked user profile will also be approved. You should be able to write an "Advanced" trigger for this.
https://drupal.org/documentation/modules/trigger

symfony2 user management logs me out randomly

I have a user management interface built from fosUserBundle, and sometimes I get logged out after opening a user, it does not matter if I edit anything on this user, and save the changes, or if I just bring up the edit user form and then hit the back link, I still get logged out without any error or warnings in app_dev.php mode.
...and I realized that is what symfony2 does when you bring up a form to edit the currently logged-in user. If I am logged in as admin, and open the edit form for this user, the next route I go to (doesn't matter which one it is) will take me to the login page, bringing up the edit form for the currently logged-in user will log me out, no error or warning.
Thought it might be helpful to someone else who doesn't know that you can't edit the currently logged-in user.
I think it would be great if symfony2 threw an exception telling you that this is the reason for auto logout, at least in dev mode.
First you should check your logs in Apache.
I had a similar issue and it was caused by duplicate column name in one of the entities. All the other entities refused to work and it ended in being logged out every time I clicked something in admin.

password protect a single page, and do not show any admin menus to the user

I've tried the "Protected Node" module, but that goes to the 404 instead of the password prompt page which it's supposed to give.
Also tried the "Simple Access" module, and after getting it to control access, realised that it still shows users the "edit" menu and there doesn't seem to be a way to switch it off for them.
Thanks to anyone who can help.
I have used the "Node Access" module before. But for one site I had to work on recently, I needed something that allows me to restrict access for anonymous users on a single page. Only visitors, who have received the password should have access.
Installing the Node Access module and creating a specific role seemed to be an overkill for this limited requirement, and I went with the "Protected Pages" module, which allows to set a password for a certain path. (d7 only)
Access to the admin is usually controlled via the user permissions as for limiting access to a specific page, this could be achieved with Panels.
Use NodeAccess module to restrict that page based on role.
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.

Drupal 7: Contact Form Not Visible, Despite Permissions

So I've enabled the site-wide and user contact forms through the Contact module, enabled ALL of the permissions (for good measure) under the Contact permissions for ALL roles. The contact form tab appears and is accessible for all users when I'm logged into my Admin account, but doesn't appear for any other user role.
I've scoured all over Drupal forums and can only find people making the mistake of forgetting to change permissions or enable the personal user contact form. I've flushed all caches and run updates, done everything I can think of.
Any ideas on what might be causing this?
I was hitting a very similar issue in respect of giving Authenticated the permission Use users' personal contact forms, then logging in and going to user/[uid]/contact results in Access Denied.
Simply I hadn't picked up that each user has to opt in to being contacted via the Personal Contact Form.
EDIT - in a comment below #tanius has provided a link to some code that could be used to mass update the settings for 'opt in' to personal contact form.
If you trip the flood filter you will also get an access denied page. You should get a system message saying "You cannot send more than 5 messages in 1 hour. Try again later.", it prevents you from even seeing the page via the access denied text.
If this is the case, you can resolve it by going to the flood table and deleting some of the entries it. It bases it on IP address so just knock a few of those out.
Give site wide contact contact form permission using code :-
<?php
function mymodule_menu_alter(&$menu)
{
if(isset($menu['contact']))
{
$menu['contact']['access callback'] = TRUE;
}
}
?>
* mymodule is your custom module name.
Try this :
1) go to admin/structure/block
2) Find the block of your contact form
3) Click Configure
4) Check visiblity settings
option - roles
Make sure none are selected so that it will be shown to all roles.
Hope this helps.
Cheers,
vishal
I had the same issue. This is what I did.
Go to Structure --> Blocks
Find here "Main content" and from drop-down menu choose "Content" field. Save your settings and check.

Resources