Changeset 1eaa7ac in iPeer


Ignore:
Timestamp:
2012-12-20T16:32:29-08:00 (6 years ago)
Author:
Compass <pan.luo@…>
Branches:
3.1.x, dev, hotfix, master, pagodabox, ticket463
Children:
af4a71f
Parents:
969a8bb
Message:

Fix #436, disable oauth for students

The implementation checks the controller/oauthclient and
controller/oauthtoken permission to decide if the use have access to it.

Location:
app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • app/vendors/shells/create_acl.php

    r969a8bb r1eaa7ac  
    572572        $this->Acl->allow($role, 'controllers/Evaluations/completeEvaluationMixeval');
    573573        $this->Acl->allow($role, 'controllers/Users/editProfile');
    574         $this->Acl->allow($role, 'controllers/Oauthclients/add');
    575         $this->Acl->allow($role, 'controllers/Oauthclients/delete');
    576         $this->Acl->allow($role, 'controllers/Oauthtokens/add');
    577         $this->Acl->allow($role, 'controllers/Oauthtokens/delete');
    578574        $this->Acl->deny($role, 'functions');
    579575        $this->Acl->deny($role, 'functions/viewemailaddresses');
  • app/views/users/edit_profile.ctp

    r969a8bb r1eaa7ac  
    5959  </table>
    6060    <div class="oauth">
     61    <?php if (User::hasPermission('controllers/Oauthclients')): ?>
    6162    <!-- OAuth Client Credentials -->
    6263    <hr align=left width=95%>
     
    7576        <?php } ?>
    7677    <?php } ?>
     78    <?php endif; ?>
     79    <?php if (User::hasPermission('controllers/Oauthtokens')): ?>
    7780    <!-- OAuth Token Credentials -->
    7881    <hr align=left width=95%>
     
    9093        <?php } ?>
    9194    <?php } ?>
     95    <?php endif;?>
    9296    </div>
    9397    <br>
Note: See TracChangeset for help on using the changeset viewer.