+ Start a Discussion
Arun BalaArun Bala 

ant tool : security definitions for apex classes & vf pages

Folks,
In ANT scripts, is there a way to define the list of profiles that are entitled to access the contents of a particular VF page or an apex class. In other words what I refer to here is the security definition(enabled profiles) for each VF page or apex class.

Any hints would be helpful.


Thanks.
Arun BalaArun Bala
Any takers ??
aalbertaalbert
Yes, the metadata api supports this Profile setting.
Check out: http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#StartTopic=Content/meta_profile.htm

Here is a snippet of my .profile file:
Code:
<—xml version="1.0" encoding="UTF-8"–>
<Profile xmlns="http://soap.sforce.com/2006/04/metadata">
    <classAccesses>
        <apexClass>AccountPlan</apexClass>
        <enabled>true</enabled>
    </classAccesses>

 

Arun BalaArun Bala
So this means, for all the profiles in the org, we may need to do this. I was thinking would there be a way to configure the list of enabled profiles on ApexClass migration script itself. I looked at the migration API docs, didnt find anything like that. Just wanted to confirm this with our folks on this forum too. Thanks aalbert.





Message Edited by Arun Bala on 12-29-2008 06:28 PM