Making WordPress.org


Ignore:
Timestamp:
07/20/2018 09:02:49 PM (6 years ago)
Author:
coreymckrill
Message:

WordCamp Payments: Update access to budget tools

This makes parts of the budget tools available to other users besides Admins
on a WordCamp site.

Authors and Editors can:

  • View the preliminary and working budgets, but cannot save changes or submit for review.
  • Create sponsor invoices, reimbursement requests, and vendor payment requests, but cannot view/change items of these types that were created by other users.

Admins still have all the same capabilities as before, and do not have the
restrictions detailed above that Authors and Editors have.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/budget-tool/main.php

    r6067 r7488  
    108108        <input type="hidden" name="_wcb_budget_data" value="<?php echo esc_attr( json_encode( $budget ) ); ?>" />
    109109
    110         <?php if ( $budget['status'] == 'draft' ) : ?>
     110        <?php if ( $budget['status'] == 'draft' && current_user_can( WordCamp_Budgets::ADMIN_CAP ) ) : ?>
    111111        <p class="submit">
    112112            <?php submit_button( esc_html__( 'Save Draft', 'wordcamporg' ), 'secondary', 'wcb-budget-save-draft', false ); ?>
     
    120120            <?php submit_button( esc_html__( 'Reject', 'wordcamporg' ), 'primary', 'wcb-budget-reject', false ); ?>
    121121        </p>
    122         <?php elseif ( $budget['status'] == 'approved' && $view == 'working' ) : ?>
     122        <?php elseif ( $budget['status'] == 'approved' && $view == 'working' && current_user_can( WordCamp_Budgets::ADMIN_CAP ) ) : ?>
    123123        <p class="submit">
    124124            <?php submit_button( esc_html__( 'Update Working Budget', 'wordcamporg' ), 'primary', 'wcb-budget-update-working', false ); ?>
Note: See TracChangeset for help on using the changeset viewer.