Re: [GROUPS] followup
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 11537
interpreted = N
texte = >We wanted to restrict catalog entry displays to only those who had group >access which matched that of the item to be displayed. In other words, >each item has a group associated with it and that group should be granted >access. The easiest solution would have been if there were a [groups] tag >like the global [UserName] tag to test against, but there isn't.> [foundItems]> [SHOWIF [lookup db=/webcatalog/users.db&> value=[Uppercase][UserName][/Uppercase]&> LookInField=user&returnfield=groups&> notFound=TextNotFound]^[PW_GROUP]]> ...> [/SHOWIF]> [/founditems]Yes, this looks like a great way to 'filter out' records that you don't want shown to certain people. A couple caveats: the [numfound] will be inaccurate in this case because you are hiding some of the records; this might get slow as the number of users or records increases, because you're doing a [lookup] every time you show a record.An example of this WebDNA technique for looking up groups can be found in the MultiGroupChecker and InGroup files that ship with WebCatalog.An alternative approach is to add a field to the database called PW_GROUP which contains the name of the group that is allowed to view this record. Then you can create a search that requires the person's group to match the PW_GROUP field in the database. This way the [numfound] is correct, and it could be faster...but I haven't tried it so there may be something I missed.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors =====Pacific Coast Software | WebCatalog Pro, WebCommerce Solution11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Associated Messages, from the most recent to the oldest:
|
- Re: [GROUPS] followup (Grant Hulbert 1997)
- [GROUPS] followup (Sven U. Grenander 1997)
|
>We wanted to restrict catalog entry displays to only those who had group >access which matched that of the item to be displayed. In other words, >each item has a group associated with it and that group should be granted >access. The easiest solution would have been if there were a [groups] tag >like the global
[username] tag to test against, but there isn't.>
[founditems]> [SHOWIF [lookup db=/webcatalog/users.db&> value=
[uppercase][username][/Uppercase]&> LookInField=user&returnfield=groups&> notFound=TextNotFound]^[PW_GROUP]]> ...> [/SHOWIF]> [/founditems]Yes, this looks like a great way to 'filter out' records that you don't want shown to certain people. A couple caveats: the [numfound] will be inaccurate in this case because you are hiding some of the records; this might get slow as the number of users or records increases, because you're doing a
[lookup] every time you show a record.An example of this WebDNA technique for looking up groups can be found in the MultiGroupChecker and InGroup files that ship with WebCatalog.An alternative approach is to add a field to the database called PW_GROUP which contains the name of the group that is allowed to view this record. Then you can create a search that requires the person's group to match the PW_GROUP field in the database. This way the [numfound] is correct, and it could be faster...but I haven't tried it so there may be something I missed.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors =====Pacific Coast Software | WebCatalog Pro, WebCommerce Solution11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMasterSan Diego, CA 92128 | SiteGuard619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com
Grant Hulbert
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:
this works sometimes and sometimes not (1997)
Bug or syntax error on my part? (1997)
[REFERRER] works with form posts (2003)
WebCat2b15MacPlugin - [protect] (1997)
Another bug to squash (WebCat2b13 Mac .acgi) (1997)
Problems with cybercash (2000)
WebCatalog 2.0 & WebDNA docs in HTML ... (1997)
Re[2]: 2nd WebCatalog2 Feature Request (1996)
[WebDNA] Styling search results [using css] (2009)
Looking up two prices in Formulas.db (1997)
RE: Languages (1997)
WebCat2.0 [format thousands .0f] no go (1997)
Talk List Suggestions (1997)
html in a database (1998)
Prices Dropped (1998)
WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997)
WebCatalog for guestbook ? (1997)
adding up in a db (1997)
Error Lob.db records error message not name (1997)
creating a ShipCosts database (1997)