I have a view that is outputting a bunch of teasers. After each teaser, i want to display an "edit" link. For this i'm rewriting the output of field Nid as link "node/[nid]/edit". This works all fine (although I'm not sure if it's the right way). Now i want to show the "edit" links only for the roles that are allowed to use it. Is it possible?

Comments

Daniel E’s picture

Well I've solved this by theming the view and writing

	 if(user_access('administer nodes')) :
		 print('<a href="' . base_path() . 'node/'. $fields['nid']->content . '/edit">Edit</a>');
	 endif;

Wish I could figure out how to do this with the UI.

hakeem’s picture

Is there another method other than theming?