Textpattern Forum

You are not logged in. Register | Login | Help

#31 2011-10-11 05:34:11

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 426

Re: smd_user_manager: keep large user bases under control

The smd_switch_role plugin don’t list the new groups created with smd_user. Normal ?

Offline

#32 2011-10-11 05:50:15

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

Re: smd_user_manager: keep large user bases under control

jpdupont wrote:

The smd_switch_role plugin don’t list the new groups created with smd_user. Normal ?

Try changing plugin load order so smd_faux_role comes after smd_um.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#33 2011-10-11 11:09:15

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 426

Re: smd_user_manager: keep large user bases under control

Ok ! I must set smd_user to 8 and faux_role to 9.
But since I create a “limited” group, allowing access to admin>change password area, it’s impossible to switch again to Admin role without phpMyAdmin.

Offline

#34 2011-10-11 13:56:00

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

Re: smd_user_manager: keep large user bases under control

jpdupont wrote:

since I create a “limited” group, allowing access to admin>change password area, it’s impossible to switch again to Admin role without phpMyAdmin.

Have you tried putting smd_faux_role in ‘permanent select list’ mode by altering the line at the top of the plugin to something like $smd_faux_position = '750, 0';? That way it always appears in a fixed screen location and you don’t need to set privs for it.

Last edited by Bloke (2011-10-11 13:56:16)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#35 2011-11-04 00:38:40

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

Re: smd_user_manager: keep large user bases under control

New version 0.11 is out. Features:

  • Added a public side container tag <txp:smd_um_has_privs> (which bears some striking similarities to ruud’s rvm_privileged, ahem). It allows you to check if the current logged-in user matches the given names / groups / areas so you can take action on your public-facing page (or dashboard) if a user has been granted access to some newfangled priv area (e.g. gymnasium, staff_room, whatever). Very handy for controlling access to locked-away content.
  • Added a pref allowing you to alter the privs of the plugin itself from the Privs panel.
  • Fixed a glaring oversight if you tried to set a user’s privs to None: you received Restricted Area if you tried to do that. In addition, nobody was permitted to edit any users with 0 privs (you had to use the multi-edit tool to set their privs to something else first).

Please report any goodness / badness with this version here. And let me know if you’re tackling any cool projects with custom priv areas: would be great to see them and the new public tag in action.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#36 2011-11-16 05:14:15

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

Re: smd_user_manager: keep large user bases under control

Hi Stef, I recently commented on your remote_file plugin which is great, so please forgive me for battering you about another thing with user_manager.

First off, I love it, and it really works well…however, I am trying to figure out how to configure it in such a way that I can deny other authors’ Articles, Images, Files, Links, etc. from appearing in the list view when logged in as a low-permission user. I tried to see if there was something like “file.view” and “file.view.own”, but there is not. I hope I am explaining myself well, but again, just trying to figure out if it’s possible to configure this plugin in such a way that I can restrict a user to seeing ONLY their articles/files/images/etc. in the list view for each of those (of the admin area).

Hoping to hear your thoughts! Thanks in advance,

- George

Offline

#37 2011-11-16 09:47:28

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

Re: smd_user_manager: keep large user bases under control

georgeM wrote:

restrict a user to seeing ONLY their articles/files/images/etc. in the list view

Sadly Txp doesn’t support this action natively; it requires a rethink of the way we do things. The main problem is that the content counts/pagination are done first and then the list is produced so it’s not possible to filter the list without screwing up the numbers.

If the count was done afterwards or we checked a preference first so we could influence the initial query we could maybe introduce such a ‘view’ priv/pref (shifting the counts later may have other consequences, I’m not sure — there’s probably a reason it’s done this way round so it makes sense to consider a preference value instead).

Ruud wrote a plugin ages ago that faked such a system. Whether it still works, or whether it’s such a hot idea in 4.4.1 I don’t know. I believe there’s also a plugin somewhere that does it via jQuery, just hiding the rows that don’t match the current logged-in author. Again, the counts will be wrong (e.g. if viewing 25 per page you might only see 8 on-screen) but if you can live with that it’s an option. Other than that you’ll have to just make do with the .edit.own privs so at least other people can’t get their mitts on other people’s content.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#38 2011-11-16 12:28:26

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,396

Re: smd_user_manager: keep large user bases under control

Hi,
you can give asv_auth_articles a try. Untill some time ago it worked perfectly

Offline

#39 2011-11-16 12:40:02

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

Re: smd_user_manager: keep large user bases under control

redbot wrote:

asv_auth_articles

Yes it will work, thanks for the link. That plugin’s essentially a clone of the Txp articles list page but with a different query — a real shame that Amit had to go so far as having to duplicate tonnes of core code for something so (apparently) simple.

There are a few downsides to the plugin though:

  1. it’s only for articles, not the other content types (I wouldn’t fancy writing and maintaining a plugin that did it for all content types as it’s a lot of duplicate code!)
  2. since it predates Txp 4.3.0 the markup it produces is that of an old Txp version. Hence it won’t have the newer layout and DOM/id/class hooks in it, so some themes won’t work properly on the List page without modification.
  3. since it uses a hard-coded <form> tag it also won’t employ the security features built into Txp in 4.4.1

By all means install it, but bear those points in mind if you do.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#40 2011-11-16 13:06:40

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,396

Re: smd_user_manager: keep large user bases under control

Bloke wrote:

…There are a few downsides to the plugin though…

Thanks for the useful infos, actually last time I used the plugin it was some txp versions ago and I didn’t take into account the intervened markup changes.

Offline

Board footer

Powered by FluxBB