Textpattern Forum

You are not logged in. Register | Login | Help

#41 2011-11-17 17:17:40

georgeM
Member
From: Toronto, Canada
Registered: 2006-02-27
Posts: 43
Website

Re: smd_user_manager: keep large user bases under control

Yes, thank you Stef. You’re a true TXP legend. I’ve been using TXP for 6+ years, and it’s great to see how much you’ve contributed to the community, even to this day.

Anyways, I think i will wait on installing asv_auth_articles due to the points that you mentioned. I have updated to 4.4.1 and would rather make sure everything is running proper on the new code.

I’ll keep an eye out in the future though, maybe it will make it into the main branch :)

Thanks again and cheers!

Offline

#42 2012-04-26 09:07:36

[Axel]
Member
From: Switzerland/Denmark
Registered: 2007-07-26
Posts: 65
Website

Re: smd_user_manager: keep large user bases under control

It was asked earlier in this thread, but I could not find an answer. I need to restrict authors only to add new articles to a section or category. You have any tips how to archive this?


Greetz [Axel]

Offline

#43 2012-04-27 15:54:29

moon blake
Member
From: near Hannover, Germany
Registered: 2009-07-16
Posts: 49

Re: smd_user_manager: keep large user bases under control

Hi Axel,

the answer you miss is here and AFAIK what sacripant wrote is still fact. I think we all hope hat there wil be a possibility in the future to restrict users to specific sections.

Dirk

Last edited by moon blake (2012-04-27 19:20:15)

Offline

#44 2012-04-28 12:05:40

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,086

Re: smd_user_manager: keep large user bases under control


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#45 2012-05-02 19:50:40

moon blake
Member
From: near Hannover, Germany
Registered: 2009-07-16
Posts: 49

Re: smd_user_manager: keep large user bases under control

Wow! Didn’t knew about that stuff. Thanks Uli.

I will play around a little with this possibilities and I think I can achieve what I want.
Still one question: why has obviously no one made a plugin out of Bloke’s code snippet? Or why hasn’t Bloke himself not integrated this in smd_user? Unfortunately I myself don’t know any PHP

Offline

#46 2012-05-02 20:16:37

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,086

Re: smd_user_manager: keep large user bases under control

moon blake wrote:

why has obviously no one made a plugin out of Bloke’s code snippet?

It’s not rocket science, just paste the code into a new plugin panel in ied_plugin_composer, name it, set some prefs (I’d say: admin side plugin, load order 5) and hit Save.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#47 2012-05-02 20:18:59

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,916
Website

Re: smd_user_manager: keep large user bases under control

moon blake wrote:

why hasn’t Bloke himself not integrated this in smd_user?

smd_user_manager is a tool to allow you to administer users and groups. What you do with the users and groups is outside the scope of the plugin. If I was to put that functionality into the plugin then, as I outlined in that thread, someone would want to play it differently and I’d be forever tweaking / expanding the plugin to suit people’s ideas of what it means to restrict users to sections.

As Uli says, with a copy of ied_plugin_composer and those 10 lines of PHP you can copy that code to create a plugin. After that, you can control who can edit what with smd_user_manager by creating a section.your-section-name priv and assigning rights to it.

I’ve used that code (or a variation) on sites before and it works1, but I don’t use the functionality enough to warrant making and maintaining a separate plugin because each site has different ideas about what constitutes ‘admin’. To do it properly would require a configuration interface and a shedload more code. The simplest solution for me is to copy the code and alter the rights in the first line to suit the site.

1 It probably won’t work when 4.5.0 is released because the new constraints system might block its use. The plugin will likely have to be altered to take that into account (but it might still work, I’m not sure right now)

Last edited by Bloke (2012-05-02 20:21:45)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#48 2012-05-03 18:15:16

[Axel]
Member
From: Switzerland/Denmark
Registered: 2007-07-26
Posts: 65
Website

Re: smd_user_manager: keep large user bases under control

I installed it on the latest Textpattern (Revision 3769: /development/4.x) and it works fine. No Idea how far away from the real 4.5 this is, I hope it will be compatible.

As this User restriction to certain sections is necessary for the site I’m working on, and the ability to upgrade without the troubles as in drupal/wordpress etc. is one of the “sales features” the client needs!

The time frame for this project is tied to the release of Textpattern 4.5 I hope I’m not wasting time right now.


Greetz [Axel]

Offline

#49 2012-07-31 03:41:53

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 814
Website

Re: smd_user_manager: keep large user bases under control

Hey Stef – how’s things?

Just trying to figure out if I am trying to use this correctly.

I’ve just taken over a site which has setup a a system where users are added via this plugin and assigned users privs, then the same user privs are entered into an article custom_field – the idea being that only users with the same user privs as the article will see the article, otherwise a message.

I’ve tested printing out the custom_field on the same form I am using this code and it works, but every time when I login with the user with the same privs, I get the error message:

<txp:smd_um_has_privs group='<txp:custom_field name="privs" />'>

Photos

<txp:else />

<p>Sorry, you do not have the correct access privileges to view these photographs</p>


</txp:smd_um_has_privs>

Offline

#50 2012-07-31 03:46:03

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 814
Website

Re: smd_user_manager: keep large user bases under control

Ps – this is a tag trace:

<txp:smd_um_has_privs group='<txp:custom_field name="privs" />'>
			[attribute 'group']
			<txp:custom_field name="privs" />
			[/attribute]
			[<txp:smd_um_has_privs group='<txp:custom_field name="privs" />'>: false]
			<txp:site_url />
		</txp:smd_um_has_privs>

Offline

Board footer

Powered by FluxBB