2 added 6 characters in body
source | link

I have a user associated to a profile which does not even have the READ permission on the customObject__c. Now I hadhave to display the customObject__c details on a VF page for this user. I used only a customController to avoid the VF honoring the FLS and Object-Level-Permissions. But I had no luck displaying the data on the VF apart from creating a inner class and displaying the data from there.

Why would the data not display if I am using a custom controller?
Why is the VF honoring the Object level permission even when I am not binding it to any VF tags like <apex:outputField> or <apex:outputText>?

<apex:page controller="customController" >
   the name is {!custClass.name} // This displays the result
   the name is {!custClass.Obj.Name} // THis is blank
   the name is {!customObj.Name} //This is blank
</apex:page>

public without sharing class customController{

    public customObject__c customObj{get;set;}
    public custClass custClass{get;set;}


    public DealReg_ViewApprovalMatrixcustomController(){
          customObj = [select name from custom_object__c limit 1];
           custClass = new customAppMatcustClass(customObj);

      }   
    }

    public without sharing class custClass{
        public customObject__c obj{get;set;}
        public string name{get;set;}
        public custClass(customObject__c objt){
            this.obj = objt;
            this.name = objt.name;
        }
    }
}

I have a user associated to a profile which does not even the READ permission on the customObject__c. Now I had to display the customObject__c details on a VF page for this user. I used only a customController to avoid the VF honoring the FLS and Object-Level-Permissions. But I had no luck displaying the data on the VF apart from creating a inner class and displaying the data from there.

Why would the data not display if I am using a custom controller?
Why is the VF honoring the Object level permission even when I am not binding it to any VF tags like <apex:outputField> or <apex:outputText>?

<apex:page controller="customController" >
   the name is {!custClass.name} // This displays the result
   the name is {!custClass.Obj.Name} // THis is blank
   the name is {!customObj.Name} //This is blank
</apex:page>

public without sharing class customController{

    public customObject__c customObj{get;set;}
    public custClass custClass{get;set;}


    public DealReg_ViewApprovalMatrix(){
          customObj = [select name from custom_object__c limit 1];
           custClass = new customAppMat(customObj);

      }   
    }

    public without sharing class custClass{
        public customObject__c obj{get;set;}
        public string name{get;set;}
        public custClass(customObject__c objt){
            this.obj = objt;
            this.name = objt.name;
        }
    }
}

I have a user associated to a profile which does not even have the READ permission on the customObject__c. Now I have to display the customObject__c details on a VF page for this user. I used only a customController to avoid the VF honoring the FLS and Object-Level-Permissions. But I had no luck displaying the data on the VF apart from creating a inner class and displaying the data from there.

Why would the data not display if I am using a custom controller?
Why is the VF honoring the Object level permission even when I am not binding it to any VF tags like <apex:outputField> or <apex:outputText>?

<apex:page controller="customController" >
   the name is {!custClass.name} // This displays the result
   the name is {!custClass.Obj.Name} // THis is blank
   the name is {!customObj.Name} //This is blank
</apex:page>

public without sharing class customController{

    public customObject__c customObj{get;set;}
    public custClass custClass{get;set;}


    public customController(){
          customObj = [select name from custom_object__c limit 1];
           custClass = new custClass(customObj);

      }   
    }

    public without sharing class custClass{
        public customObject__c obj{get;set;}
        public string name{get;set;}
        public custClass(customObject__c objt){
            this.obj = objt;
            this.name = objt.name;
        }
    }
}
1
source | link

Does object level permission effect data visibility on a VF page with Custom controller?

I have a user associated to a profile which does not even the READ permission on the customObject__c. Now I had to display the customObject__c details on a VF page for this user. I used only a customController to avoid the VF honoring the FLS and Object-Level-Permissions. But I had no luck displaying the data on the VF apart from creating a inner class and displaying the data from there.

Why would the data not display if I am using a custom controller?
Why is the VF honoring the Object level permission even when I am not binding it to any VF tags like <apex:outputField> or <apex:outputText>?

<apex:page controller="customController" >
   the name is {!custClass.name} // This displays the result
   the name is {!custClass.Obj.Name} // THis is blank
   the name is {!customObj.Name} //This is blank
</apex:page>

public without sharing class customController{

    public customObject__c customObj{get;set;}
    public custClass custClass{get;set;}


    public DealReg_ViewApprovalMatrix(){
          customObj = [select name from custom_object__c limit 1];
           custClass = new customAppMat(customObj);

      }   
    }

    public without sharing class custClass{
        public customObject__c obj{get;set;}
        public string name{get;set;}
        public custClass(customObject__c objt){
            this.obj = objt;
            this.name = objt.name;
        }
    }
}