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.
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.