Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Changing User Privileges
I’d like to have a User with Privileges the same as Freelance but they can only see their own articles.
Is it possible to create such a level of User? via a plugin or adding to the dB
Thanks
Geoff
An after thought – Even better if you could limit the User to contribute to only a limited number of Sections
Last edited by geoff777 (2008-06-23 22:08:32)
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
#2 2008-06-23 21:42:41
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Changing User Privileges
geoff777 wrote:
but they can only see their own articles.
textpattern.org employs such a thing (#42 or #43), ruud has written it, but not released publicly.
Even better if you could limit the User to contribute to only a limited number of Sections
sed_section_fields is the one.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Changing User Privileges
uli wrote:
textpattern.org employs such a thing (#42 or #43), ruud has written it, but not released publicly.”
Interesting, perhaps he’d consider releasing it?
uli wrote:
“sed_section_fields is the one.”
I looked at that plugin & it will be useful, but I really wanted to be able to assign users to different sections.
Fred=>Football only
Mary=>Netball & Recipes
Harry=>Sea Fishing, Taekwondo, Football & Horticultural Society
etc.
Thanks for your suggestions ULI :-)
Last edited by geoff777 (2008-06-23 22:40:03)
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: Changing User Privileges
I won’t release it publicly, because it essentially duplicates the entire txp_list.php code and makes upgrading needlessly difficult (because you’d have to keep the plugin code in sync).
Offline
#5 2008-06-24 00:26:25
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Changing User Privileges
In this case improvisation’s needed:
Geoff, you could hide the article list tab with tame_privs ($txp_permissions['list'] = '1,2,3';)
, so freelancers don’t see other authors’ articles. Then you’d have to give them access to their articles from the front side via an Edit link (delete from <txp:article_image/>
to <txp:article_image/>
incl.). The link code has to be wrapped in rvm_privileged, so it is only shown to the logged in person.
Remains removing the recent articles links from the “advanced” part of the write tab, and the light yellowish prev/next links top right hand (both changes to txp_article.php). (Provided they aren’t needed that much by other staff folks.)
Hope I thought of everything that grants access to other peoples articles …
For the section stuff I’d suggest contacting sthmtc. He has written an also unreleased plugin, that might be capable of removing sections from the section menu on a per author basis. He wrote about it here.
Edited to correct the code for tame_privs.
Last edited by uli (2008-06-24 22:22:40)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Changing User Privileges
Hi Uli
One again a big thanks. I think it’s ‘needed’ for a freelancer’s privacy. I’m not sure from your explanation above how Freelancers could see their draft articles from the front side. I have used the edit link myself on my blog, but for unpublished articles?
Perhaps this new level of User privileges could be included in a future version of Textpattern.
It seems logical not to have other freelancers able to read other contributors draft articles, which are unpublished and works in progress. I think a level of privacy while working on a draft article is essential.
Ruud obviously thought it was needed at Textpattern.org
Thanks again
Geoff
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
#7 2008-06-24 08:56:30
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Changing User Privileges
geoff777 wrote:
but for unpublished articles?
wet_if_status on a “secret” section.
Checks only for live or sticky, but can easily be changed.
Last edited by uli (2008-06-24 10:03:09)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Changing User Privileges
Hi Uli,
Sorry – I’ll rephrase my question How would freelancers find their draft articles?
I use ‘Edit Now’ on my published articles … but how is it possible to use ‘Edit Now’ on the Front side for drafts? Surely Drafts aren’t available on the front side?
I’m not clear how the wet_if_status plugin used on a ‘Secret’ section would help?
It all seems very complicated using a number of plugins to remove functionality from the Admin side.
Then creating a round about way to add some of the functionality back on the Front side?
It would be far easier to use Ruud’s plugin … which does exactly what I want? Very frustrating.
Thank you again for your time and suggestions.
I can only hope that the ability for Freelancers to see other peoples articles in the Admin side is changed in a future Textpattern version or another type of user created.
I don’t want people reading my drafts … I can see it causing huge problems, especially in the Local Politics sections if draft articles can be read by other users.
People might write one thing then decide to completely retract, reword, or rework their article, but the draft article might have been read and circulated by other users able to read the draft. I’m going to have to warn users about this flaw in the software.
I’m amazed that no one else (except Ruud) hasn’t thought this to be a huge problem before.
I can only think that most Textpattern sites are single author.
Or that they are set up by groups of friends.
Any community portals especially where users may hold opposing opinions, are going to find this lack of privacy a problem.
Another issue with the Freelancer user permissions that could cause problems, is it is possible to copy parts or whole articles written by another user and saved as a draft.
If user A is writing an article and saves it as a draft. User B can come along copy part or all of the article and publish before user A.
Not going to happen too often you would hope, but I wouldn’t want to be the Admin in the middle of this. Especially if user A had spent a lot of time on the article. How would I know who’d copied from whom?
Okay hopefully the last scenario will never arise … but it potentially could.
Any other forum ‘regulars’ got an opinion on this?
Last edited by geoff777 (2008-06-24 10:51:40)
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
#9 2008-06-24 10:54:10
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Changing User Privileges
Surely Drafts aren’t available on the front side?
I’m not clear how the wet_if_status plugin used on a ‘Secret’ section would help?
Errm … didn’t want to believe it, but it seems you’re right. Thought I’ve read a method for these cases anywehre with wet_if_status mentioned, but …
Status “draft” shure isn’t meant for confidential kind of information. If an author doesn’t want a draft to be read, s/he wouldn’t probably “publish” it anywhere, as there will always be somebody who has access to everything. But never say never ;)
Plugin authors, to the rescue! :)
Last edited by uli (2008-06-24 13:01:17)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Changing User Privileges
uli wrote:
“Status “draft” shure isn’t meant for confidential kind of information. If an author doesn’t want a draft to be read, s/he wouldn’t probably “publish” it anywhere, as there will always be somebody who has access to everything. But never say never ;)”
I think a users drafts should certainly be confidential within the textpattern Admin side. Only when it is in a final form and set to Pending and then published by the ‘Admin’ should it be for anyone elses eyes.
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
#11 2008-06-24 13:00:15
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Changing User Privileges
D’oh: On the hoof I just forgot to add the status="draft"
thing to the article tag and set myself on the wrong track with wet_status, which isn’t part of the solution.
In short: Create a section “drafts”, let draft articles be “published” only there (the sthmtc plugin).
On the page put an article tag with status="draft"
in it ;) an appropriate high value for “limit”, and a form attribute. Edit: Plus allowoverride="0"
<txp:article status="draft" limit="999" allowoverride="0" sort="posted desc" form="draft_editing" />
In the form “draft_editing” put for each author the following code once:
<txp:rvm_if_privileged name="YOUR AUTHOR">
<txp:if_article_author name="YOUR AUTHOR">
<txp:title />
<txp:body />
<!-- article edit link -->
<br />
</txp:if_article_author>
</txp:rvm_if_privileged>
Works!
Last edited by uli (2008-06-24 13:27:52)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Changing User Privileges
Front Side :-
Freelancers login to Admin and then go to the Front Side to a Page I create for Freelancers to visit. Where they see a list of their current drafts which are displayed using the rvm_if_privileged plugin with the code in your last post.
:-)
Admin Side
I use the sed_section_fields plugin to make a Section called ‘Drafts’ which is the only section Freelancers can post to. (Unfortunately the default is not for ‘Static Sections’) :-(
1. Remove the recent articles links from the “advanced” part of the write tab.
2. Remove the light yellowish prev/next links top right hand
(both changes to txp_article.php).
It looks like I’m going to have to make changes to txp php files making upgrading difficult (okay not as easy as it could be) which is the reason Ruud gave for not releasing his plugin …?
The bit I’m not sure how to implement :-
Hide the article list tab with tame_privs (‘admin.list’ => ’1,2,3,’,)
How and where do I change these permissions.
Cheers Uli
Last edited by geoff777 (2008-06-24 13:49:35)
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline