mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00

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.
15 lines
436 B
HTML
15 lines
436 B
HTML
<template name="postAdmin">
|
|
{{#if isAdmin}}
|
|
<div class="post-meta-item">
|
|
{{#if postsMustBeApproved}}
|
|
|
|
|
{{#if isApproved}}
|
|
<a href="#" class="unapprove-link goto-edit">Unapprove</a>
|
|
{{else}}
|
|
<a href="#" class="approve-link goto-edit">Approve</a>
|
|
{{/if}}
|
|
{{/if}}
|
|
| {{i18n "score"}}: {{shortScore}}, {{i18n "clicks"}}: {{clicks}}
|
|
</div>
|
|
{{/if}}
|
|
</template>
|