25 Commits

Author SHA1 Message Date
ian%hixie.ch
c39644bda6 * Improved the helpfulness of the extremely verbose debugging information of PLIF.pm by quoting embedded variables
* Implemented MagicCollectingArray, which acts like MagicPipingArray except that the result is collected into one big array instead of multiple arrayrefs
* Added the relevant getCollecting*List methods to the Controller class
* Added DESTROY methods to the magic array to prevent DESTROY method calls from being propagated
* Made the debug.dumpVars string more robust when the data hash includes one of the three magic characters '(', '.' or ')'
* Implemented sanitation in COSES so that any keys in the data hash containing one of the three magic characters '(', '.' or ')' will have them transliterated to '[', ':' and ']' respectively (sanitation is optional and can be bypassed)
* Changed the API of the generic output module's 'output' method to take the optional $session argument last, thus simplifying the call sites a lot
* Implemented the 'dispatcher.output' service in several classes to return strings that must be support in variants (required for a good UI in the COSES editor)
* Renamed the Login module's strings so that they use the dot-notation separating significant parts


git-svn-id: svn://10.0.0.236/trunk@96296 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-04 06:13:22 +00:00
ian%hixie.ch
31afdd6c43 Stub implementation of a COSES editor component, plus added 'component.nameOfComponent' to the list of services provided by the other two components
git-svn-id: svn://10.0.0.236/trunk@96279 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-03 23:06:09 +00:00
ian%hixie.ch
a4e5deac24 Moved AdminCommands.pm and Login.pm to a Component directory
git-svn-id: svn://10.0.0.236/trunk@96278 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-03 22:45:37 +00:00
ian%hixie.ch
c77a5c18e0 Minor bug fixes required to make the code run without crashing...
git-svn-id: svn://10.0.0.236/trunk@96276 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-03 16:14:41 +00:00
ian%hixie.ch
c054620213 Some more minor corrections to get it to run as well as compile... (removes some XXX comments and adds some error checking)
git-svn-id: svn://10.0.0.236/trunk@96275 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-03 15:27:16 +00:00
ian%hixie.ch
e283e3f98d Fixing a gazillion syntax, logic and XML errors and adding some debug code. It compiles!
git-svn-id: svn://10.0.0.236/trunk@96274 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-03 14:49:41 +00:00
ian%hixie.ch
1c4b9ea728 * Added some comments (including some XXX comments where I realised we had missing code)
* Added implicit data to the hash passed to the string expander from the generic output service
* To support the implicit data, added a |hash| stub method to the Session.pm module (and changed the already implemented version in the descendant user service to take this into account)
* To support the implicit data, added |hash| and |getArguments| methods to the Input.pm module (and implemented |getArguments| in the Arguments.pm module)
* To support the implicit data, made the Program.pm module keep track of the executing command
* To support the implicit data, added |hash| and |name| methods to the Program.pm module (actually, |name| was already assumed to exist in other parts of the codebase)
* Corrected trivial semantic mistake in Program.pm's |verifyInput| method
* Added a way to get a user not by username but by a specific address (modifies the user service and the user data source and it's MySQL implementation)
* Implemented GenericOutputs.pm, an implementation of 'dispatcher.output.generic' and 'dataSource.strings.default' for some strings used by other parts of PLIF (currently only supports 'stdout' and 'http' protocols, and minimally at that)
* Implemented Login.pm, a helper module that implements user authentication, user creation and the sending of a new password if it is forgotten, a utility method |hasRight| to ensure that the authenticated user has a particular right (resulting in a message if not), and various routines to support all this.


git-svn-id: svn://10.0.0.236/trunk@96268 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-03 10:11:58 +00:00
ian%hixie.ch
1e260d62d7 * fixing some syntactic errors
* added addUserGroup and removeUserGroup to the data source interface for users
* added some comments
* changed many double quotes |"| to single quotes |'| where double quotes were not needed
* implemented the remaining methods for the MySQL implementation of the user data source
* added a mode flag to user fields (idea from MattyT) so that fields can be disabled, hidden, etc


git-svn-id: svn://10.0.0.236/trunk@96152 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-01 00:32:35 +00:00
ian%hixie.ch
66a92ef424 Change the semantics of address changing, making it faster, smaller, simpler, and better. Aaah... :-) In the new system, instead of cloning the current $session object to pass it back to the output code, you pass the real $session object to the output code, just making sure that the relevant field has been warned to return a different address than found in the database.
git-svn-id: svn://10.0.0.236/trunk@96006 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-29 20:34:12 +00:00
ian%hixie.ch
7d520650d0 Adding some XXX comments regarding a known bug (when the user is changing their address, fields try to update the database before the new address has been authenticated)
git-svn-id: svn://10.0.0.236/trunk@95992 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-29 09:11:33 +00:00
ian%hixie.ch
10a6e949df * Fixing a minor bug in the MySQL implementation of the string data source
* Started implementing the MySQL version of the user data source (completed so far: database creation and a few of the SELECT calls)
* Changed the user property 'disabled' to 'mode' to enable extensibility
* Fix a potential bug with changing addresses (make sure the fake session object doesn't update the database -- this is an incomplete solution so far, fields still have the bug)


git-svn-id: svn://10.0.0.236/trunk@95991 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-29 09:07:10 +00:00
ian%hixie.ch
3bf5452821 * Moving 'type' to the front of the list of things returned by the User data source's 'getField*' methods so that they map more directly to the user field constructor arguments
* Moving 'typeData' around in the order of the user field constructor arguments to match the User data source's 'getField*' methods so that, again, they map more directly
* Renaming the 'getFieldFrom*' methods to 'getFieldBy*' to be consistent with 'getUserBy*'
* Implemented UserFieldFactory.pm
* Implemented Passwords.pm


git-svn-id: svn://10.0.0.236/trunk@95980 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-28 23:43:56 +00:00
ian%hixie.ch
db3ed07d92 * Correcting a typo in Input.pm
* Added a comment to DataSource/User.pm explaining how (typically) to search for a username
* Fleshed out the DataSource/User.pm API by adding some schema management methods
* Added notes on which fields in the database schema should be keys
* Added comment to Service/User.pm noting the difference between Objects, Services, and Service Instances
* Changed 'user.field.factory' to 'user.fieldFactory' to prevent a namespace collision with 'user.field.(type)'
* Calling 'insertField' in one case which I missed when adding the method
* Implemented 'hash', 'joinGroup', 'invalidateRights', 'writeProperties' and 'writeGroups'
* Changed Service/UserField.pm so that one user field class can be used for any category
* Added a 'username' convenience method and implemented 'write'
* Added a comment to Service/UserFieldFactory.pm explaining how it should work
* Removed the 'user.field.generic.generic' field implementation, replaced it with a simpler 'user.field.string' implementation


git-svn-id: svn://10.0.0.236/trunk@95977 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-28 20:09:23 +00:00
ian%hixie.ch
84ed67d880 Added some minor corrections and clarifications to the documentation.
Added some comments to various user-related files.
Factored out some code that started becoming common when inserting fields in Service/User.pm.
Added code to deal with adding new contact details.
Added code to support removing fields from a user.


git-svn-id: svn://10.0.0.236/trunk@95862 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-24 07:06:41 +00:00
ian%hixie.ch
b790f3b930 Started work on fleshing out the user components. This is still work in progress.
git-svn-id: svn://10.0.0.236/trunk@94860 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-14 06:45:08 +00:00
ian%hixie.ch
3e2f8b13fb Initial checkin of the Field part of the User work. Just ideas at the moment, nothing here is implemented, and much of it is likely to change.
git-svn-id: svn://10.0.0.236/trunk@94821 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-13 20:54:35 +00:00
ian%hixie.ch
21e06d49a5 First pass at adding User objects (derived from Session). Lots of XXX code -- none of this works, it's basically all stubs.
In addition to the code that actually does stuff, I still need to add a MySQL implementation of the data source and the Field class and its associated Factory.
Also added Passwords.pm (stubs for a password generator and encryptor) and made Session objects store a pointer to the controller object.


git-svn-id: svn://10.0.0.236/trunk@94818 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-13 18:11:54 +00:00
ian%hixie.ch
175e51509e Added a bit more support for objects (as opposed to services): added a new objectCreate() constructor and an objectInit() method.
Added an optimisation to Controller.pm so that service names will be hashed once accessed. This should make multiple accesses of the same service a lot quicker. To go with this I added some diagnostics code (on exit) and moved the code around a little bit.
Fixed a minor transgression of the coding style guidelines in Magic*Array.pm. :-)
Neatened up the code in Output.pm.
Made it so Session objects assume they have an 'app' property, and so don't need to be passed $app all the time. (Sessions are objects now.)
Added an unimplemented getAddress() method to the Session class.


git-svn-id: svn://10.0.0.236/trunk@94817 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-13 18:04:52 +00:00
ian%hixie.ch
87e48ce3f8 fixing two rather serious (albeit simple) bugs in the strings data source; adding a comment to Input.pm in preparation for doing the user authentication stuff
git-svn-id: svn://10.0.0.236/trunk@94807 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-13 05:52:24 +00:00
ian%hixie.ch
0fdc941055 adding some progress messages to the setup output; making COSES more resilient to invalid input
git-svn-id: svn://10.0.0.236/trunk@94168 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 00:05:42 +00:00
ian%hixie.ch
2c7f039451 Slight changes to make output code more flexible
git-svn-id: svn://10.0.0.236/trunk@94104 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 07:04:17 +00:00
ian%hixie.ch
d33e786523 * fixed the methodMissing() method so that it actually is possible to use it to do method dispatching;
* factored out some of the method dispatching code by adding a dispatchMethod() method to the controller;
* turned the Dispatcher class into simply a function on the base Service class and removed Dispatcher.pm;
* made it possible for services to be both services and objects and provide different services depending on which context they were called in (and used this to make the AdminCommands module actually do what it was intended to in the first place, namely, only work for CommandLine access);
* fixed it so if a service is first created by getServiceList the constructed version will actually be cached;
* made output more generic by allowing services to implement arbitrary parts of the output API, used that to make AdminCommands usable without requiring additional code to support it;
* added some documentation;
* added some dump(10) statements to help debugging;
* fixed the string datasource SQL;
* fixed the DBI database so it can handle errors;
* added tableExists API to the DBI database helper.
Thanks to myk, justdave and zach for some ideas.


git-svn-id: svn://10.0.0.236/trunk@94080 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-06 06:26:24 +00:00
ian%hixie.ch
2cb0e0a8bf Made the lack of a configuration file be non-fatal (and factored out the low level code while I was at it). We need that so that the configuration data source can actually go in and create the configuration file if it is missing; otherwise the program exits with "no configuration file! waah!" before you get to the configuration-file-creation code!
git-svn-id: svn://10.0.0.236/trunk@94067 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 19:00:06 +00:00
ian%hixie.ch
ad0bceba08 Implementing (and documenting!) PLIF::debug() as suggested by zach. a=hixie
git-svn-id: svn://10.0.0.236/trunk@94066 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 18:28:08 +00:00
ian%hixie.ch
72c3f78013 work in progress
git-svn-id: svn://10.0.0.236/trunk@94031 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-05 07:12:56 +00:00