summaryrefslogtreecommitdiff
path: root/perl/Wallet/Server.pm
AgeCommit message (Collapse)Author
2007-12-07Load the Perl modules for ACL verifiers and object types dynamicallyRuss Allbery
now that we're reading the class from the database.
2007-12-05Various coding style fixes and cleanup based on a much-appreciatedRuss Allbery
code audit by Simon Cozens. I didn't take all of his advise, and he shouldn't be blamed for any remaining issues.
2007-12-05Determine the class for object and ACL schema implementations from theRuss Allbery
database rather than a hard-coded list and provide Wallet::Schema methods for adding new class mappings. Add a missing class mapping for the netdb ACL schema verifier.
2007-12-01Following the DBI documentation, turn on AutoCommit after RaiseError soRuss Allbery
that we have some hope of getting error messages if it fails.
2007-12-01Don't disconnect on destruction of the server object if the handle isRuss Allbery
marked with InactiveDestroy.
2007-12-01Expiration dates are now expressed in YYYY-MM-DD HH:MM:SS instead ofRuss Allbery
seconds since epoch and returned the same way. Timestamps are now stored in the database as correct date and time types rather than seconds since epoch to work properly with MySQL.
2007-11-30Initial work on supporting testing with MySQL.Russ Allbery
Add a drop() method to Wallet::Schema to destroy the wallet database. Add a test suite for it. Add a reinitialize() method to Wallet;:Server that drops the database before creating it. Modify the wallet object test cases to call reinitialize() to create the initial database and drop() to clean up the database after the test is complete. Fix a bug preventing Wallet::Schema from being initialized multiple times. We now stash the schema in a class static variable and reuse it for subsequent initializations, since re-reading DATA doesn't work.
2007-11-20Attempt to create the object with a default owner on get and storeRuss Allbery
when the object doesn't exist.
2007-11-20Add support for running a user-defined function whenever an object isRuss Allbery
created by a non-ADMIN user and using the default owner ACL returned by that function provided that the calling user is authorized by that ACL. This permits dynamic creation of new objects based on a default owner ACL programmatically determined from the name of the object.
2007-10-11Add an acl_history method to the server layer and test it.Russ Allbery
2007-10-10Add the history method (for objects).Russ Allbery
2007-10-05Add comprehensive license information in LICENSE and update the copyrightRuss Allbery
and license statements in all files. Make sure that some files that were missing copyright information now have them. Reference LICENSE rather than README in all notices.
2007-09-20Take multiple values in the attr() method and convert it to a referenceRuss Allbery
to an array internally so that the callers don't have to be aware of the internal API.
2007-09-20Change the error handling of the Wallet::ACL list() method to return theRuss Allbery
empty list on errors and clear error() so that it can be used to distinguish between an error and an empty ACL.
2007-09-20Add support for attribute setting and retrieving to the high-levelRuss Allbery
interface with appropriate ACL support. Retrieving is controlled by the show ACL and setting is controlled by the store ACL, both falling back to owner.
2007-09-18Add flag_set and flag_clear to Wallet::Server.Russ Allbery
2007-09-17Add an acl_show() method to Wallet::Server that calls the underlying ACLRuss Allbery
show() method.
2007-09-01Note that not all objects support store.Russ Allbery
2007-09-01Add some additional safeguards to ensure that users cannot destroy,Russ Allbery
rename, or remove the last entry from the ADMIN ACL. Add full documentation for Wallet::Server.
2007-08-31Use a better method of setting the internal error that automaticallyRuss Allbery
adjusts for trailing newlines and exception detritus, saving duplicate code. Standardize the documentation of the error() method and document using this in child classes of the generic ACL and Object classes. Disable printing of errors during connect in Wallet::Server since we're going to throw our own exception.
2007-08-31Allow empty DB_INFO and DB_NAME settings as long as they're defined.Russ Allbery
2007-08-30Fix ACL verification for destroy and flags actions. Clear the internalRuss Allbery
error before accessor functions that can return undef not because of an error but just because the column is null so that the caller can tell the difference.
2007-08-30Return true from object creation, not the new object, which would be aRuss Allbery
layering violation. Fix permission denied error messages for store. Don't give administrators global access to get and store, since it would encourage bad ACL practices. When checking ACLs, instantiate the ACL object correctly. Support clearing attributes and propagate object errors into the server error correctly. Reject stores of undefined data (the empty string is okay).
2007-08-30Properly clean up errors from exceptions. Properly catch exceptions whenRuss Allbery
creating ACL objects in Wallet::Server. Don't return the ACL object from the acl_create method of Wallet::Server -- it's a layering violation.
2007-08-30Clean up all exception output when storing it in the error variable toRuss Allbery
remove the " at line" stuff added by Perl and the newlines so that the errors stored in objects are consistent. Fix various bugs in the base object, including a few more type vs. name inversions and use of object instead of name. Allow owners to be specified as ACL names instead of IDs, and change the ID to a name in show. Add a new test suite for the base object implementation.
2007-08-30Fix all the interfaces so that objects are identified as type, name, notRuss Allbery
name, type, and fix the schema for the places where I'd renamed name to object for no good reason. I don't know what I was thinking originally.
2007-08-30This class now provides a method to do database initialization, whichRuss Allbery
shares database open code with the new method. Add an accessor function to get at the database handle, which is useful for testing. Add a DESTROY method to shut the database connection down cleanly.
2007-08-29Add an initialize function to Wallet::Server to set up the database.Russ Allbery
2007-08-29Wallet::Server is now responsible for connecting to the database. Don'tRuss Allbery
bother working hard to disconnect the database on exit, since the DESTROY DBI method will do the right thing.
2007-08-29Fix the store implementation to take the right arguments.Russ Allbery
2007-08-28Initial untested implementation. Now supports all the remaining metadataRuss Allbery
operations on objects and the full set of ACL operations.
2007-08-28Checkpoint. The object manipulation functions are here, as are the ACLRuss Allbery
verification pieces.