summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2017-10-13Set session expiration time in cookie as well as in the databaseHEADmasterSergey Poznyakoff2
2017-10-13Implement Enum type. Use it for user->status.Sergey Poznyakoff11
* lib/App/Sourceyard/Enum.pm: New file. * lib/DBIx/Class/InflateColumn/App/Sourceyard/Enum.pm: New file. * lib/Sourceyard/User/Status.pm: New file. * t/enum01.t: New test case. * t/enum02.t: New test case. * t/enum03.t: New test case. * t/enum04.t: New test case. * lib/Sourceyard/Controller/Account.pm: Use Sourceyard::User::Status. * lib/Sourceyard/User.pm: Likewise. * script/convuser.pl: Likewise. * lib/Sourceyard/Schema/Result/User.pm: Inflate the status column to Sourceyard::User::Status and vice-versa.
2017-10-12Store sessions in the databaseSergey Poznyakoff6
* lib/Sourceyard.pm (startup): Set up secrets and session expiration ttl. * lib/Sourceyard/Config.pm (session): New section. * lib/Sourceyard/Controller.pm (session): New method. (set_user): Use the user_for_session method to obtain user struct having the session key. * lib/Sourceyard/Schema/Result/Session.pm: New file. * lib/Sourceyard/Schema/Result/User.pm (session): New relation. * lib/Sourceyard/User.pm (create_session): New function.
2017-10-12Improve configuration supportSergey Poznyakoff2
* lib/App/Sourceyard/Config.pm (get): Return list or list ref depending on the calling context. * lib/Mojolicious/Command/config.pm (run): Use Data::Dumper to format values.
2017-10-11Log information about log-ins, user registrations and password changesSergey Poznyakoff2
2017-10-10Implement syslog loggingSergey Poznyakoff3
* lib/Sourceyard.pm: Set up logging depending on configuration. * lib/Sourceyard/Config.pm (log syslog): New configuration sections. * lib/Sourceyard/Log/Syslog.pm: New file.
2017-10-09Fix typoSergey Poznyakoff1
2017-10-09Fix checking for existing accounts during registrationSergey Poznyakoff3
* lib/Sourceyard/User/Template.pm: Fix overloaded methods. * lib/Sourceyard/Controller.pm (user_for_hash): Use the single method, instead of search->first. * lib/Sourceyard/User.pm: Likewise.
2017-10-09Implement confirmation hash expirationSergey Poznyakoff11
* lib/App/Sourceyard/Config/Node.pm (order, default): Fix argument recognition. * lib/App/Sourceyard/Config/Node/Value.pm (value): Likewise. * lib/App/Sourceyard/ParseInterval.pm: New file. * lib/Sourceyard/Config.pm (register.confirmation-ttl): New setting. (_check_interval): New checker. * lib/Sourceyard/Controller.pm (user_for_hash): New method. * lib/Sourceyard/Controller/Account.pm: Use user_for_hash and confirm_hash for manipulating hashes. * lib/Sourceyard/Schema/Result/ConfirmHash.pm: Add date column (record creation date). * lib/Sourceyard/User.pm (confirm_hash): New method. * lib/Sourceyard/Controller/User.pm (admin): Handle delete_hash parameter. * templates/mail/account/recover.txt.ep: Mention the way of removing existing password change requests. * templates/user/admin.html.ep: List existing password request along with a button for its deletion.
2017-10-08Implement lostpwSergey Poznyakoff9
* lib/Sourceyard.pm: Implement new routes * lib/Sourceyard/Config.pm (core.sitename): New setting. * lib/Sourceyard/Controller/Account.pm (user_login): Check for undefined user name. (lostpw,recoverpw,changepw): New actions. * lib/Sourceyard/Mailer.pm (send): Remove debugging output. * lib/Sourceyard/User.pm (controller, create_hash): New methods. * templates/account/changepw.html.ep: New file. * templates/account/lostpw.html.ep: New file. * templates/account/recovered.html.ep: New file. * templates/mail/account/recover.txt.ep: New file.
2017-10-08Remove site-specific config from the repo.Sergey Poznyakoff2
2017-10-08Finish implementing new account registration.Sergey Poznyakoff12
* lib/Sourceyard.pm (startup): Add public/templates to the beginning of the template path. Route /account/confirm * lib/Sourceyard/Config.pm (syntax): New keyword core.domain. * lib/Sourceyard/Controller/Account.pm (register): Send confirmation email. * lib/Sourceyard/Mailer.pm: New file. * lib/Sourceyard/User.pm: Change constructor calling sequence. * templates/account/badconfirm.html.ep: New file. * templates/account/confirmed.html.ep: New file. * templates/account/registered.html.ep: New file. * templates/layouts/mail.txt.ep: New file. * templates/mail/account/register.txt.ep: New file. * templates/user/gpg_keys.html.ep: Minor change.
2017-10-06Implement user creation (follow-up to bbe7985b7).Sergey Poznyakoff9
* lib/App/Sourceyard/Config/Cached.pm: cache => 2 invalidates existing cache. * lib/App/Sourceyard/User/Template.pm (set): New method. (new): Call set after initializing base class. * lib/Sourceyard.pm (startup): Simplify captcha init. * lib/Sourceyard/Controller/Account.pm (register): Fix user creation arguments. * lib/Sourceyard/Schema/Result/ConfirmHash.pm: New file. * lib/Sourceyard/Schema/Result/User.pm: Remove confirm_hash Add it as a relation. * lib/Sourceyard/User.pm (new): Set confirm_hash when creating new user. * lib/Sourceyard/User/Template.pm (new): Call set. * script/convuser.pl: Reflect changes to the database structure.
2017-10-06Improve configuration APISergey Poznyakoff13
* lib/App/Sourceyard/Config.pm: Rewrite using App::Sourceyard::Config::Node objects instead of the hashes to represent tree nodes. Remove caching. * lib/App/Sourceyard/Config/Cached.pm: New file. Implement caching features. * lib/App/Sourceyard/Config/Locus.pm (format): Don't reference undefined values. * lib/App/Sourceyard/Config/Node.pm: New file. * lib/App/Sourceyard/Config/Node/Section.pm: New file. * lib/App/Sourceyard/Config/Node/Value.pm: New file. * lib/App/Sourceyard/Glob.pm: New file. * lib/Mojolicious/Command/config.pm: New file. Implements the "config" command. * lib/Sourceyard.pm (config): New method. * lib/Sourceyard/Config.pm: Inherit from App::Sourceyard::Config::Cached. * t/TestConfig.pm: Import :sort * t/conf02.t: Update method names. * t/conf11.t: New file.
2017-10-05Improve configuration APISergey Poznyakoff3
* lib/App/Sourceyard/Config.pm (get): Call $ref as a class method if it is a CODE * lib/Sourceyard/Config.pm (syntax): Use subs as default values for register.captcha.enable and register.captcha.font (new): Get rid of the kludge. * t/conf10.t: New testcase.
2017-10-05Implement user registration frameworkSergey Poznyakoff21
* lib/App/Sourceyard/User/Template.pm: New file * lib/Sourceyard/User/Template.pm: New file. * public/fonts/DejaVuSerif-Bold.ttf: New file. * t/utmpl00.t: New file. * t/utmpl01.t: New file. * t/utmpl02.t: New file. * t/utmpl03.t: New file. * t/utmpl04.t: New file. * templates/account/register.html.ep: New file. * templates/account/registerhint.html.ep: New file. * lib/Sourceyard.pm (input_error): New helper. Register the captcha plugin if register.captcha.enable is set. Set default theme. Route /account/register depending on register.enable. * lib/Sourceyard/Config.pm (syntax): New sections: register and mail. (new): Make sure register.captcha.font is absolute. Unset register.captcha.enable if register.enable is false. (public_dir, public_file): New methods. (_check_public_file): New checker. * lib/Sourceyard/Controller/Account.pm (register): New action. * lib/Sourceyard/Controller/User.pm: Use Sourceyard::User::Template to check input values for realname, email and password. * lib/Sourceyard/User.pm (new): Create new record if passed a App::Sourceyard::User::Template as argument. * public/css/Savannah.css (button): New class. * public/css/internal/base.css (vcell, span.notice): New classes. * templates/account/login.html.ep: Use absolute uris. * templates/layouts/account.html.ep: Add toptitle and topmenu before the content. * templates/user/admin.html.ep: Minor fixes.
2017-10-02Implement removal of skill records.Sergey Poznyakoff8
2017-10-02Implement user resume and skills pageSergey Poznyakoff17
2017-09-29Implement configuration syntax checkingSergey Poznyakoff5
* lib/App/Sourceyard/Config.pm (writecache): Fix typo. * lib/Mojolicious/Plugin/ACL.pm: Import FindBin. * lib/Sourceyard/Config.pm: Implement syntax checking. Turn on caching. * lib/Sourceyard/Controller.pm: Get theme from the 'core' section. * sourceyard.conf: Updated.
2017-09-29Update gitignoreSergey Poznyakoff1
2017-09-29Improve configuration API.Sergey Poznyakoff7
* lib/App/Sourceyard/Config.pm (readconfig) Call the check coderef as a method. (fixup): Rename to _fixup. Make sure mandatory and default settings are processed even if the section they are declared in is not present in the supplied configuration. Call select coderef as a method. * lib/App/Sourceyard/Config/Locus.pm: Overload + and "". (new, add): Take two or more arguments, the first two being filename and line number and optional rest supplying additional line numbers in the same file. (clone, add_locus): New methods. * t/conf08.t: New file. * t/conf09.t: New file. * t/locus.t: Test new features.
2017-09-28Implement "upgrade password" feature.Sergey Poznyakoff3
* lib/App/Sourceyard/Password.pm (method, upgradable): new methods * lib/Sourceyard/Controller/Account.pm (user_login): Upgrade password hash if allowed and necessary. * sourceyard.conf: Add auth.upgrade_hash
2017-09-28Move ACL checks into a pluginSergey Poznyakoff3
* lib/Mojolicious/Plugin/ACL.pm: New file. * lib/Sourceyard.pm: Load it. * sourceyard.conf: Configure ACL.
2017-09-28Minor fixSergey Poznyakoff1
2017-09-28Document GPG objectsSergey Poznyakoff2
2017-09-28Use file upload to accept new GPG keysSergey Poznyakoff5
* lib/Sourceyard/Schema/Result/GPG_Keys.pm: Inflate the gpg_key column to PublicKey, instead of the PublicKeySet. * lib/App/Sourceyard/GPG/PublicKey.pm (new): Accept keyword arguments. All callers updated. * lib/Sourceyard/Controller/User.pm: Use file upload instead of copy-paste for accepting new keys. * templates/user/gpg_keys.html.ep: Likewise.
2017-09-28Improve error checking in App::Sourceyard::GPG::PublicKeySetSergey Poznyakoff3
* lib/App/Sourceyard/GPG/PublicKeySet.pm (PKS_OK, PKS_EMPTY) (PKS_INVALID, PKS_SYSERR): New constants. (_parse): Set _status and _error instead of bailing out. (status, error, clean): New methods. (pubkey, pubkeys): Return immediately unless status is PKS_OK * lib/Sourceyard/Controller/User.pm (gpg_keys): Use diagnostic string returned by validate_gpg_key. * lib/Sourceyard/User.pm (validate_gpg_key): Optionally return a diagnostic string.
2017-09-28Rename GPG classesSergey Poznyakoff6
App::Sourceyard::GPG::PublicKey became App::Sourceyard::GPG::PublicKeySet App::Sourceyard::GPG::Key became App::Sourceyard::GPG::PublicKey All uses updated
2017-09-27Implement editing the SSH and GPG keysSergey Poznyakoff13
2017-09-25user/admin: Change password; store changed data.Sergey Poznyakoff12
* lib/App/Sourceyard/Password.pm: New file. * t/pass.t: Test case for App::Sourceyard::Password. * t/TestConfig.pm: Inherit from App::Sourceyard::Config. * lib/Sourceyard/Schema/Result/User.pm: inflate user_pw to App::Sourceyard::Password. * lib/Sourceyard.pm (_opt_buttons): Optional button text can be passed in keyword arguments. * templates/opt/button.false.html.ep: Configurable button names. * templates/opt/button.true.html.ep: Likewise. * lib/Sourceyard/Controller/Account.pm (pwcheck): Remove method. (user_login): Use Sourceyard::User->user_pw->check to verify the password. * lib/Sourceyard/Controller/User.pm: Actually store updated data in the database. * lib/Sourceyard/User.pm: Inherit from Sourceyard::Schema::Result::User. (validate_real_name, validate_email) (validate_password): New methods. * templates/user/admin.html.ep: Change password on request.
2017-09-24Add backward-compatible css and image filesSergey Poznyakoff61
2017-09-24Further experiments on user/admin pageSergey Poznyakoff5
* lib/Sourceyard.pm: New helpers: opt_input, opt_button, and theme_list. Handle post requests to user/ (_alt_tag): Add alt prefix only to the first of classes. * templates/opt/button.false.html.ep: New file. * templates/opt/button.true.html.ep: New file. * templates/user/admin.html.ep: Implement "Secondary Arrangements"
2017-09-22Reproduce entire layout of user/admin from SavannahSergey Poznyakoff1
2017-09-22New helper 'alt_tag' for alternating class tagsSergey Poznyakoff2
2017-09-22Provide tag helper for top-line menu itemsSergey Poznyakoff3
* lib/Sourceyard.pm: New helper 'top_menu_item'. * templates/menu/topuser.html.ep: Use top_menu_item.
2017-09-22Start implementing user personal pagesSergey Poznyakoff15
* lib/Sourceyard.pm: Predeclare user and return_url stash vars. Route user/ requests. * lib/Sourceyard/Controller.pm (clone): New method. * lib/Sourceyard/Controller/Account.pm (login): Redirect to / if already authenticated. (user_login): Redirect to return_url, defaulting to /. * lib/Sourceyard/Controller/Main.pm: Don't use is_logged_in. * lib/Sourceyard/Controller/User.pm: New file. * lib/Sourceyard/Schema/Result/User.pm: Load InflateColumn::DateTime. Index on user_name. * templates/account/login.html.ep: Move feedback div to include/feedback.html.ep. Include it. * templates/include/feedback.html.ep: New file. * templates/layouts/default.html.ep: Omit div.indexright if statistics stash var is not defined. * templates/layouts/user.html.ep: New file. * templates/menu/anonmenu.html.ep * templates/menu/leftmenu.html.ep: Use the 'user' stash var instead of is_logged_in * templates/menu/topuser.html.ep: New file. * templates/menu/usermenu.html.ep: Use absolute locations. * templates/user/admin.html.ep: New file.
2017-09-21Implement statistics frameworkSergey Poznyakoff4
2017-09-21Implement logout; restore user's preferred theme on loginSergey Poznyakoff12
* lib/Sourceyard/User.pm: New file. * lib/Sourceyard/Controller.pm: New file. Derived controller class. * lib/Sourceyard/Controller/Account.pm: Change base class * lib/Sourceyard/Controller/Main.pm: Likewise. * lib/Sourceyard/Schema/Result/User.pm: Add theme * script/convuser.pl: Copy theme * sourceyard.conf: Add default theme * templates/layouts/account.html.ep: Select stylesheet and icon using the preferred theme. * templates/layouts/default.html.ep: Likewise. * templates/menu/anonmenu.html.ep: Update. * templates/menu/leftmenu.html.ep: Update. * templates/menu/usermenu.html.ep: Update.
2017-09-19Implement loginSergey Poznyakoff10
2017-09-19Create DBIx schemasSergey Poznyakoff109
Create Savane DB schema. Create initial sourceyard DB schema. So far it contains data corresponding to the savane.user table. Write deploy script and a script for converting the user table to the new format.
2017-09-19Port configuration module from Savane-graySergey Poznyakoff14
2017-09-19Initial commitSergey Poznyakoff413

Return to:

Send suggestions and report system problems to the System administrator.