Changeset 64584e3 in iPeer


Ignore:
Timestamp:
2012-12-21T03:11:42-08:00 (5 years ago)
Author:
Compass <pan.luo@…>
Branches:
3.1.x, dev, hotfix, master, pagodabox, ticket463
Children:
e3341f9
Parents:
43dab3b
git-author:
Compass <pan.luo@…> (12/20/2012 04:32:29 PM)
git-committer:
Compass <pan.luo@…> (12/21/2012 03:11:42 AM)
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

    r43dab3b r64584e3  
    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

    r43dab3b r64584e3  
    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.