How can I create a view that is visible for administrators only?
All members of the other roles shouldn't be able to see that particular "view" from the Navigation menu.

I tried with "access control" but didn't find the solution.

Comments

maastrix’s picture

What do you mean by "view"? You want a menu specially for admins? It's possible to make a new menu (admin/menu/menu/add) or block (admin/block/add) and allow only admins to view this menu or block.

jazzitup’s picture

When I said "view" I thought of a module: http://drupal.org/project/views

To be more precise, I had problems with hiding "recent posts" and "popular recent contents" from unauthorised visitors.

--
madjoe

Gman’s picture

When you are creating the view, you select all the user roles that are permitted to see the view display. All others will get the access denied page.

I believe all the resultant pages and blocks from the defined view will have the same access control.

-Gman

jazzitup’s picture

Thanks, Gman! That helped...
The problem was that I had a problem with automatically created views by some modules.
I expected an intuitive action "edit", "properties", or something like that, but didn't give a try with "add" (an enabled view, that later becomes overriden). Everything's ok now!

--
madjoe

deuteron’s picture

It seems you had the same confusion with the missing "edit access" on module created views like I have today.
I'm messing around with "administration views" and want to alter that module created view for different roles... I don't get your way to solve the problem...

what exactly did you "add" (a new, "empty" view?) and how did you override it? :( I can't find any help or solution on that on the whole internet :(

fsg’s picture

I am the admin user for a site, so I do not have root access. It does not appear that the Views module is installed. When I go into Administer/Modules, Views module is not listed.

But I wanted to setup a private area that only authenticated users can view (once logged in) so this thread was interesting to me as it seems that Drupal can do this. Is this a simple as getting my host to install the Views module so I can access it for user role permissions?

TIA,

Tom Smith
tjs@zebmfg.com

Gman’s picture

This is possible a number of ways. If you don't want any content shown to outsiders, just deselect Access Content permission in the access control setting.

Or you can create a new node type with the Content Creator Kit module, and the restrict access to the new node types to the people you want.

Or you can use the Taxonomy Access module, set up a vocabulary and restrict access to certain terms. Then when you create pages, you select the term of the group you want to see the pages.

Short answer, NO you don't need Views to restrict access. The access we are talking about is who can look at a particular View, regardless if they can see the node individually or not. -Gman

fsg’s picture

Gman,

Thanks for your post.

Hopefully, this does not sound too basic. As I noted, I am a Site admin without root access. So I can only play with Drupal settings that are in installed modules. I cannot install modules. And my host had a youngster install Drupal, So he does not understand it. And I trying to help him understand specifically what he needs to do before I ask him to install anything else.

Back to the problem at hand:
I can add or edit a taxonomy term (vocabulary), but I cannot see anywhere to set Taxonomy Access. It is not directly within the Add function, and I cannot see any other module that may allow this. I have a module called "taxonomy" and "taxonomy_browser" but not "taxonomy_access".

In a similar manner, I can (and users can) create various kinds of content, but none of the content types have any options to allow or disallow certain user types (like Anonymous users) to view a specifc page. Only in Setting general permissions for users can I see anything like that, and Anonymous users have only the Node Modules "access content" turned ON. If we turn that off, then a casual anonymous browser will not see anything on the site. But we only want to restrict access to specific pages or menus, not the entire site.

So, do we need the Views module, or the Taxonomy Access Module (Lite or not), or both? Would there be any issue installing both modules and just using the settings to configure what we might need? I realize that they are not officially part of the Drupal release.

TIA,

Tom Smith

Gman’s picture

Yes, the taxonomy_access is a seperate module that you would need to install. I think that is what you need. Then you can set particular nodes to have term, and then use the access control to grant or deny group access according to that term, or set of terms. I have not used the Tax Access Control (TAC) lite so I can't guide you there.

Restricting menus by role, is a bit tricky, but check out the menu/block code snippets to see if you can grab a pre-coded way to do it. They are in the Handbook.

shiju john’s picture

I have created a listing page using views. In views there is an option to Add menu. I have selected Menu tab and added the menu. Thh problem here is the tab is appearing for all content types, but I need it only in my section content type. Any solutions will be great!

fxarte’s picture

It seems that, in the particular view, you have to set the "Access restrictions" to "Permission" and then set the "Permission" to "edit own [content-type] content", or "create [content-type] content", this way only those users that can administer, or edit it, will have access to the view.
Also make sure you control the access to that content in all possible ways. In my case I use the module: "Content Access".

Jennypinkston’s picture

I had the same problem with one of my sites. Hopefully, these solutions will help to solve the issue for sure. I think it can be solved using menus option as stated above.