Textpattern Forum

You are not logged in. Register | Login | Help

#1 2008-08-23 17:53:54

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

bot_privs: edit user level privileges

This plugin allows to modify user level privileges with the help of an interface located under the “extensions” tab.
You can choose to hide or show entire admin tabs or sub-tabs for each privilege level defined in the “users” tab (“designer”, “staff writer”, etc.).
Moreover you can set other privileges (all normally hard coded in the “admin_config” file) such as “can edit article” or “can edit own article” or “can edit own published article” and so on.

Ok, nothing special really (even if it was not so easy task for me), all in all it simply avoids to have to hack admin_config.php and it just adds an interface to the existing plugin tame_privs (which does the same thing but is a little raw cos it requires to change plugin’s code by hand). Maybe someone will find it useful.

The plugin creates his own table so it doesn’t mess with anything in the db. It provides also an option to remove the installation table and to reset privs to their default state.

This is my first plugin (and I’m no programmer) so be patient if something does not work. If I have the time I’ll try to add more functionality in the future.

features

  • modify user level privileges through an interface
  • can easily reset privs to default
  • should not interfere at all with other txp tables and functions

Installation
Once the plugin is activated go to extensions=>privileges and click “install” to install the plugin table.

Changes v0.3.2

  • Slight code change. This doesen’t introduce new ‘official’ features but let’s you easily hack the plugin to add new privileges

Changes v0.3.1

  • Fixes a bug with the privileges added by txp 4.2.0

Changes v0.3

  • This version works only with Txp 4.2.0. – for previous versions use v. 0.2.
  • More privileges are added following the changes in admin_config.php
  • I’ve removed the sloppy “can see all articles” feature added by me in v. 0.2. If you need such functionality use this plugin by Variaas instead

download
bot_privs_v0.3.2.txt

Last edited by redbot (2009-11-16 00:27:39)

Offline

#2 2008-08-23 18:49:23

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: bot_privs: edit user level privileges

This looks great and will be useful. Cool first plugin.

One request, I would like to define custom privilege levels. Any idea if this will be possible in the future?

Offline

#3 2008-08-23 19:36:35

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,091
Website

Re: bot_privs: edit user level privileges

redbot wrote:

P.S. I’m posting here because I don’t seem to be allowed to post in “author support” […]

Well, now you are.

Offline

#4 2008-08-23 23:52:59

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

Re: bot_privs: edit user level privileges

graeme wrote:

This looks great and will be useful. Cool first plugin.

Thank you very much! But before you speak is better to assure it works as expected (I’ve tried to test it thoroughly but as I said I’m absolutely not an expert).

One request, I would like to define custom privilege levels. Any idea if this will be possible in the future?

I was thinking exactly the same thing.
Maybe a viable first workaround (at least for my limited php skills) could be the capacity to add an infinite number of profiles (overcoming the existing limit of six profiles), which is an indirect way to obtain the same result because if you want to define privileges for author x you can create a new user level that suits your author.
I’m not sure but I think this is doable. As soon as I can (maybe not so soon) I’ll try to see if I manage to do it .

wet wrote:

Well, now you are.

Thank you wet! As soon as someone tries it and reassures me it works I’ll open a new thread (is it ok?)

Offline

#5 2008-08-24 07:47:29

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,178
Website

Re: bot_privs: edit user level privileges

redbot wrote:

Thank you wet! As soon as someone tries it and reassures me it works I’ll open a new thread (is it ok?)

Think you should just move it over now, for tidiness if nothing else.


TXP Tips | @txptips | Me | @jonathanstubbs | Github

TXP Builders – finely-crafted code, design and txp @txpbuilders

Offline

#6 2008-08-24 08:20:38

net-carver
Admin
From: UK
Registered: 2006-03-08
Posts: 1,648

Re: bot_privs: edit user level privileges

Redbot

Congratulations on becoming a plugin author! Looking forward to more useful plugins from you :)


Steve
Textile | My plugins on GitHub | @netcarver

Offline

#7 2008-08-24 08:46:05

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 4,492
Website

Re: bot_privs: edit user level privileges

[topic moved to plugin support]

Offline

#8 2008-08-24 10:56:27

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 685
Website

Re: bot_privs: edit user level privileges

Thanks! I was used to tame_privs, but an easier interface was definitely needed! :)

Z

Offline

#9 2008-08-24 11:51:02

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

Re: bot_privs: edit user level privileges

net-carver wrote:

Congratulations on becoming a plugin author! Looking forward to more useful plugins from you :)

Thank you very much Steve ;)

Zanza wrote:

Thanks! I was used to tame_privs, but an easier interface was definitely needed! :)

Thanks to you, if it weren’t for you I never knew about tame_privs

ruud wrote:

[topic moved to plugin support]

Thanks!

Offline

#10 2008-11-14 20:23:48

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

Re: bot_privs: edit user level privileges

great work, thank you!

Offline

Board footer

Powered by FluxBB