Gossamer Forum
Home : Products : DBMan : Customization :

Re: [delicia] separate password and permission

Quote Reply
Re: [delicia] separate password and permission In reply to
So you're logging into B and you want to just see:

View B | Modify B

and instead you're seeing

| View B | Modify B | View A | Modify A |

Yes?

If you are using the same auth directory for both databases, you don't have to log into each one separately. You are logged in to both (or all, if there were three or more) at the same time. If you want separate log-ins, you'll have to have completely separate databases that don't share any files in common. Or make pretty extensive changes to the script.

Thinking of wild possibilities.... You could change the whole structure of the permission system to use a hash, using the database name. Instead of $per_view, you would use $per_view{$db_setup}. In order to do this, though, you would have to keep track of which databases had been logged into. You could probably use the temporary file that's created in the auth directory for this, so that when you logged in to a database, it would first check to see if there was an existing file. If not, it would create one and write to the file

$db_setup:1:0:1:0

(or whatever the permissions are from the .pass file for that database).

If there was a file already, it would just add another line to the file, so in our case after logging into both, it would be

DatabaseB:1:0:1:0
DatabaseA:1:1:1:1

Then, in your footers, you would say something like

if $per_view{'DatabaseB'} print "View B"

This would be quite a change to the auth.pl file, as well as every reference to permissions in the db.cgi file. I guess it's doable.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Subject Author Views Date
Thread; hot thread separate password and permission delicia 10678 May 16, 2006, 10:26 AM
Thread; hot thread Re: [delicia] separate password and permission
JPDeni 10482 May 17, 2006, 12:09 PM
Thread; hot thread Re: [JPDeni] separate password and permission
delicia 10476 May 17, 2006, 5:58 PM
Thread; hot thread Re: [delicia] separate password and permission
JPDeni 10472 May 17, 2006, 10:13 PM
Thread; hot thread Re: [JPDeni] separate password and permission
delicia 10469 May 18, 2006, 3:40 AM
Thread; hot thread Re: [delicia] separate password and permission
JPDeni 10468 May 18, 2006, 9:04 AM
Thread; hot thread Re: [JPDeni] separate password and permission
delicia 10468 May 18, 2006, 1:40 PM
Thread; hot thread Re: [delicia] separate password and permission
JPDeni 10460 May 18, 2006, 1:49 PM
Thread; hot thread Re: [JPDeni] separate password and permission
delicia 10491 May 18, 2006, 1:55 PM
Thread; hot thread Re: [delicia] separate password and permission
JPDeni 10473 May 18, 2006, 2:00 PM
Thread; hot thread Re: [JPDeni] separate password and permission
delicia 10443 May 18, 2006, 2:08 PM
Thread; hot thread Re: [delicia] separate password and permission
JPDeni 10449 May 18, 2006, 2:14 PM
Thread; hot thread Re: [JPDeni] separate password and permission
delicia 10446 May 18, 2006, 2:22 PM
Post; hot thread Re: [delicia] separate password and permission
JPDeni 10445 May 18, 2006, 2:29 PM
Thread; hot thread Re: [delicia] separate password and permission
delicia 10463 May 18, 2006, 2:34 PM
Thread; hot thread Re: [delicia] separate password and permission
delicia 10481 May 18, 2006, 2:41 PM
Post; hot thread Re: [delicia] separate password and permission
JPDeni 10471 May 18, 2006, 10:37 PM
Thread; hot thread Re: [delicia] separate password and permission
JPDeni 10459 May 19, 2006, 8:49 AM
Thread; hot thread Re: [JPDeni] separate password and permission
delicia 10463 May 19, 2006, 1:04 PM
Thread; hot thread Re: [delicia] separate password and permission
delicia 10434 May 19, 2006, 1:20 PM
Thread; hot thread Re: [delicia] separate password and permission
delicia 10429 May 19, 2006, 1:47 PM
Post; hot thread Re: [delicia] separate password and permission
LoisC 10436 May 19, 2006, 10:04 PM
Post; hot thread Re: [delicia] separate password and permission
JPDeni 10464 May 18, 2006, 2:48 PM