I have designed a drupal site where there are 'teacher' roles. The users with teacher roles can create blogs as well as forum post. The standard authenticated user role can only create forum posts.

To keep track of what the teacher role users are doing, I have set up taxonomy terms using the names of the users(teacher roles) and I have them set as required fields when they publish content to the site. So the teacher role users will have to select a required taxonomy field when they publish blogs or forum posts. To hide the required field from the forum post for the standard authenticated user roles I have used the 'taxonomy_role module' to do this.

Everything works flawlessly and the taxonomy is keeping track of all content to its relevant user.

Now the owner of the site (administrator) wants to publish forum posts created by authenticated user roles to the front page. Basically, if he sees a good forum topic created by an authenticated user, he would like to be able to publish it to the front page.

The problem is that the required taxonomy field kicks in and wants the administrator to select a required taxonomy field even though the administrator has not been selected for this role and is not even present on the list!
Is there a way I can override the required taxonomy field for the administrator? I don't want to include the administrator in the taxonomy terms user list as this is going to mess up views pages that I've created based on the taxonomy terms.
The easiest option I can see is to change this taxonomy field to not required. I don't want to do this either as the teacher roles are more than likely to forget to select the taxonomy term if they don't have to select it and this content will not be gathered on views pages that are dependent on the taxonomy user name terms.

Need to get this sorted. Very grateful for any help.

Thanks in advance.

Comments

lloowen’s picture

hello again. Doesn't any one have any ideas?

lloowen’s picture

Doesn't anyone have a clue on how to solve this problem? I really could do with some help on this. :(

MichaelSRed’s picture

I'm not sure if this will fit your needs or not, but the easiest way I can think of to do this is to create another role for the administrator to use, giving him another user account if necessary. Set the permissions for the new role identical to that of the administrator, except for the taxonomy fields you need to hide.

If the administrator is using the actual "administrator" (user ID 1) account, you won't be able to restrict anything because the normal Drupal access/permissions code is bypassed for that user.

lloowen’s picture

Hi!

I also did that, but as soon as I gave this new user role permission to publish to front page. I was back to the same problem again:(

mattwmc’s picture

Could you just have the admin edit the teachers node and add a tax term like 'front page' and then create a view for that term and insert it in the front page?

lloowen’s picture

Hello.

I did just that. But it messes up a views page that I created, where each member of the role has an avatar ordered by the latest post they did. Looks weird with a 'front page' in this views grid.

mattwmc’s picture

Did you make the 'front page' a separate view?

Then you could just insert the php code in the front page.

Shouldn't mess any other view up, unless I'm not following how you did it, lol - which could be the case.

But that's how I do it for my site. I edit a post with the proper tax term so it goes where I want, when I want.

jmlavarenne’s picture

I might not understand your issue, but couldn't you simply follow what these teachers are doing by looking for their posts? A user view would let you do that without needing to use taxonomy role.