Protect Tag and Groups

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 15987
interpreted = N
texte = Thanks to all for the help with protect tag and groups info. I realized afer I sent my last message that the [protect] tag was providing the groups info to the MultiGroupChecker. I've got this working the way I want ..... for the moment. I am enjoying the fact that I can set this up and customize every aspect. This being only one example. RH Prouty bristol@interpage.net---------------- Begin Forwarded Message ---------------- Date: 02/11 9:57 PM Received: 02/12 11:04 AM From: Kenneth Grome, ken@iav.com Reply-To: Webcatalog, WebDNA-Talk@smithmicro.com To: Webcatalog, WebDNA-Talk@smithmicro.comTo make things simpler, here's how to make your own custom checking code that works with another database instead of the Users.db.1- Duplicate the Users.db and rename the new copy Custom.db. 2- Duplicate the MultiGroupChecker file and rename the new copy CustomChecker. 3- In your new CustomChecker file, change all the Users.db references to Custom.db. 4- Put both of these files in the same folder as the pages you want to protect.Now, wherever you want to protect a page based on the data in your new Custom.db, simply put:[include file=CustomChecker&groups=TESTING]at the top of the page. It will work just like the [protect] tags do, but with the Custom.db instead of the Users.db. >I studied the multigroupchecker. I get the include setup which will work >for what I want and, I will set it up separately as you suggest. But >part of the logic is still unclear to me. > >Part of multigroupchecker code is: > >[search >db=Users.db&groupsword=ww&wogroupsdatarq=[uppercase][groups][/uppercase]&eq >userdatarq=[uppercase][username][/uppercase]&eqpassdatarq=[uppercase][passw >ord][/uppercase]] > >[/search] > >You are taking the values from [password] and [username] and making them >part of the search criteria,Right.>but what about [groups]. Where did the >value come from inside [groups].It came from the [protect ] tag ... or from the groups= parameter in the new [include] tag you're going to use instead of the [protect] tag.>If you wanted to protect an ADMIN page say... wouldn't you change >[groups] to ADMIN ...No, you don't change the [groups] tag, you simply put ADMIN in the include tag that goes in your templates, like this:[include file=CustomChecker&groups=ADMIN]And if you're not using your own custom protection components, using:[protect ADMIN] does the same thing by referencing the Users.db.>How would I use this same kind of search to look for and list all the >groups to which a particular user is admitted?Listing all the groups is not the task of this code. If you want to see a list of what's in the groups field in the database, you can display that field just like any other field in any database. But remember, the [groups] field you're referring to above is NOT inside a [founditems] context, so it's not referring to a database field, it's referring to the value of the variable that is created when you use:[protect ]or[include file=CustomChecker&groups=]>When you edit the groups someone is a part of they need only be separated >by a space... correct?Yes that's correct.>This shows them listed in whatever groups are >listed each separated by spaces. ADMIN Group2 Group3.Right! In the groups field in the database, you must separate the group names by blank spaces ... but when you refer to more than one group in a protect tag, you must separate those group names with commas, not with spaces, like this:[protect ADMIN,STUDENTS,VENDORS]or when you're using your new Custom.db and CustomChecker file to do your page protection, it looks like this:[include file=CustomChecker&groups=ADMIN,STUDENTS,VENDORS]Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://webdna.net/----------------- End Forwarded Message ----------------- Associated Messages, from the most recent to the oldest:

    
  1. Protect Tag and Groups (RH Prouty 1998)
  2. Re: Protect Tag and Groups (Grant Hulbert 1998)
  3. Re: Protect Tag and Groups (Kenneth Grome 1998)
  4. Protect Tag and Groups (RH Prouty 1998)
  5. Re: Fwd: Protect Tag and Groups (John Hill 1998)
  6. Fwd: Protect Tag and Groups (RH Prouty 1998)
Thanks to all for the help with protect tag and groups info. I realized afer I sent my last message that the [protect] tag was providing the groups info to the MultiGroupChecker. I've got this working the way I want ..... for the moment. I am enjoying the fact that I can set this up and customize every aspect. This being only one example. RH Prouty bristol@interpage.net---------------- Begin Forwarded Message ---------------- Date: 02/11 9:57 PM Received: 02/12 11:04 AM From: Kenneth Grome, ken@iav.com Reply-To: Webcatalog, WebDNA-Talk@smithmicro.com To: Webcatalog, WebDNA-Talk@smithmicro.comTo make things simpler, here's how to make your own custom checking code that works with another database instead of the Users.db.1- Duplicate the Users.db and rename the new copy Custom.db. 2- Duplicate the MultiGroupChecker file and rename the new copy CustomChecker. 3- In your new CustomChecker file, change all the Users.db references to Custom.db. 4- Put both of these files in the same folder as the pages you want to protect.Now, wherever you want to protect a page based on the data in your new Custom.db, simply put:[include file=CustomChecker&groups=TESTING]at the top of the page. It will work just like the [protect] tags do, but with the Custom.db instead of the Users.db. >I studied the multigroupchecker. I get the include setup which will work >for what I want and, I will set it up separately as you suggest. But >part of the logic is still unclear to me. > >Part of multigroupchecker code is: > >[search >db=Users.db&groupsword=ww&wogroupsdatarq=[uppercase][groups][/uppercase]&eq >userdatarq=[uppercase][username][/uppercase]&eqpassdatarq=[uppercase][passw >ord][/uppercase]] > >[/search] > >You are taking the values from [password] and [username] and making them >part of the search criteria,Right.>but what about [groups]. Where did the >value come from inside [groups].It came from the [protect ] tag ... or from the groups= parameter in the new [include] tag you're going to use instead of the [protect] tag.>If you wanted to protect an ADMIN page say... wouldn't you change >[groups] to ADMIN ...No, you don't change the [groups] tag, you simply put ADMIN in the include tag that goes in your templates, like this:[include file=CustomChecker&groups=ADMIN]And if you're not using your own custom protection components, using:[protect ADMIN] does the same thing by referencing the Users.db.>How would I use this same kind of search to look for and list all the >groups to which a particular user is admitted?Listing all the groups is not the task of this code. If you want to see a list of what's in the groups field in the database, you can display that field just like any other field in any database. But remember, the [groups] field you're referring to above is NOT inside a [founditems] context, so it's not referring to a database field, it's referring to the value of the variable that is created when you use:[protect ]or[include file=CustomChecker&groups=]>When you edit the groups someone is a part of they need only be separated >by a space... correct?Yes that's correct.>This shows them listed in whatever groups are >listed each separated by spaces. ADMIN Group2 Group3.Right! In the groups field in the database, you must separate the group names by blank spaces ... but when you refer to more than one group in a protect tag, you must separate those group names with commas, not with spaces, like this:[protect ADMIN,STUDENTS,VENDORS]or when you're using your new Custom.db and CustomChecker file to do your page protection, it looks like this:[include file=CustomChecker&groups=ADMIN,STUDENTS,VENDORS]Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://webdna.net/----------------- End Forwarded Message ----------------- RH Prouty

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

++ (2005) Test (2002) Newbie Help Needed (1998) Here's how to kill a Butler Database. (1997) Cookie problems using Mozilla and Camino browsers (2004) PCS Frames (1997) Include a big block of text (1997) More on the template cache problem... (2000) b12 cannot limit records returned and more. (1997) hm. (2002) Summary search -- speed (1997) WebCatalog Use Question (1997) absolute paths for databases? (1997) &max= (2003) Strange ShowIf behaviour (2001) WebCat2b15MacPlugin - [protect] (1997) Newbie questions (1999) Denying access by IP address (2000) deadlock (2000) Off Topic: Help Wanted (1997)