Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-12-17 21:26:03

manncj
Member
From: Buckinghamshire, England
Registered: 2007-10-23
Posts: 48
Website

Adding new level of privileges

Is there any way of adding an additional level of user privileges to password up a certain area of the website using the ign_password_protect plugin?
Thanks in advanced!
CM

Offline

#2 2009-12-18 04:39:00

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Adding new level of privileges

if you only want to grant access to “a certain area” and not the backend, create a user with priviliges set to none. Is that what you want to achieve?


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#3 2009-12-18 06:10:40

manncj
Member
From: Buckinghamshire, England
Registered: 2007-10-23
Posts: 48
Website

Re: Adding new level of privileges

it is but i would like a couple of different nones so the different user groups have permissions have access to different parts of the site

Offline

#4 2009-12-18 06:32:16

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Adding new level of privileges

hmmm… maybe you could do some homebrewing in conjunction with rvm_privileged if you can allow by user name, but I’m afraid I’m too tired to really think it through right now.

Curious to see if others have better suggestions…

edit: blast: this means users need to login at the backend i believe

Last edited by JanDW (2009-12-18 06:34:39)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#5 2009-12-18 09:46:00

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Adding new level of privileges

Do you really need to add new levels, or would it suffice to adapt and rename existing ones? In that case have a look at bot_privs to edit the user levels, and wet_babble to rename them.

Offline

#6 2009-12-18 10:03:06

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Adding new level of privileges

…Or you can just add the users with any privs number to the DB. The number doesn’t exactly matter, and any number that isn’t defined in add_privs call or admin_config, doesn’t have rights to use backend. After that you can match that number with ign_password_protect etc and that’s it.

Offline

#7 2009-12-18 10:34:02

manncj
Member
From: Buckinghamshire, England
Registered: 2007-10-23
Posts: 48
Website

Re: Adding new level of privileges

how do i add the privs number to the db?

Offline

#8 2011-08-30 17:02:12

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Re: Adding new level of privileges

Jan (or Els), I’m having a heck of a problem finding out how to, as Jan put it, “grant access to ‘a certain area/Section’ and not the back-end…” But when I set that permission to “none” it won’t let access to anything, not even the ‘certain areas.’ Is there something else I need to do?

Thank you,


Living the Location-Independent Life: www.NuNomad.com

Offline

#9 2011-08-30 18:35:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,392
Website GitHub

Re: Adding new level of privileges

For the record, from Txp 4.4.0 anyone who is assigned Group 0 (a.k.a. None) is not permitted to login. From memory they are bounced back to the login screen.

But you can create additional Groups (numbers 7, 8 ,9, …) using a suitable plugin such as smd_user_manager. Any people assigned to these groups will be allowed to login but unless you assign them some admin-side privileges (again, perhaps via smd_um) they will see no tabs besides View Site.

Historically, the word Privs (permissible Areas of the admin side) has been synonymous with Groups (User Roles). We are moving towards a system of:

  1. User accounts, assigned to a…
  2. Group which has a series of…
  3. Permissions to view certain facets of the admin side

Note that in the outline above, no mention is made of the public site. Permissions, groups, users, etc have no importance whatsoever on the public site unless you choose to attach some meaning to them by permitting people to log in directly from the public side (or carry their admin-side login over to the public side) and then attach some meaning to that login — usually by way of the Group you have assigned to a user.

Note that smd_user_manager will permit you to create new Privileges (Permissions) to suit your application. Thus you could create a new Group called Gold Member (Group number 7) and create privs called gallery.view, gallery.add, etc. . If you assign those two permissions to the Gold Member Group, you imply that you want users in that group to see and/or add images to the gallery section of your web site. You would have to code all the logic in to check the level and verify the permissions yourself.

I do intend to add some tags to smd_user_manager to make it simpler from the public side to test for permissions. rvm_privileged checks if someone is in a certain group: smd_um should extend this and allow you to check if a user has a particular privilege to an area of your choice. Watch the plugin page for more.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#10 2011-08-30 18:47:52

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 591
Website

Re: Adding new level of privileges

smd_um should extend this and allow you to check if a user has a particular privilege to an area of your choice. Watch the plugin page for more.

What a great feature that would be. Thanks Stef!

Offline

Board footer

Powered by FluxBB