Using {{pathFor}}, path(), and url() where possible. Passing in path
to Meteor.absoluteUrl() where the IronRouter functions didn't make sense.
Also deleting some random unused code.
Add the following hooks:
- ``addToUserSchema``: fields to add to the (currently unused) user
Schema
- ``postAuthor``: templates to use when rendering the post author in the
byline
- ``userProfileDisplay``: additional templates to add to the user
profile display.
- ``userProfileEdit``: additional templates to add to the user profile
editing form.
- ``userProfileFinishSignup``: additional templates to show in the view
for completing user signup (adding email, username, etc).
- ``userEditRenderedCallbacks``: Callbacks executed on "rendered" for
user_edit view.
- ``userEditClientCallbacks``: Callbacks used to further process user
properties before saving changes in user_edit view.
- ``userProfileCompleteChecks``: Functions called to determine whether
a user profile is "complete" (e.g. has email, username, and whatever
else).
These hooks facilitate package authors changing which profile fields are
displayed, which profile fields are required, and how to display
usernames next to posts.
We're using a fork with a different definition of "isAdmin" (using
``meteor-roles`` rather than the boolean user.isAdmin). ``lib/user.js``
provides abstracted methods for reading admin state, which makes it very
easy to change our definition -- except that the abstractions weren't
used universally.
This commit finishes the job of using the abstractions, and adds a few
new parts to also allow abstracting setting and updating admin-ness:
- setAdmin: sets admin status directly on a user object.
- updateAdmin: executes a mongo update to set admin status.
- adminMongoQuery: the query parameter for admin-ness, for composing
user queries with other fields.
- notAdminMongoQuery: the query parameter for not-admin-ness.
Using jshint and and fixmyjs I went through and removed 220 trivial
Javascript errors – mostly missing semicolons, and some properties that
weren’t written in dot notation. You can view the diff of jshint’s
output here:
https://gist.github.com/christianbundy/7b37c51bb6f7c8d739e7/revisions