高章伟
2022-02-18 8b5f4c6c281cfa548f92de52c8021e37aa81901e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public with sharing class SurveyManagerController {
    private ApexPages.StandardController stdControl;
    public Boolean editCSS;
    
    public Boolean getEditCSS(){
        return editCSS;
    } 
    
    public SurveyManagerController(ApexPages.StandardController stdController){
        this.stdControl = stdController;
        
        List<User> res = [SELECT Profile.PermissionsAuthorApex FROM User WHERE id=:Userinfo.getUserId()];
        User u = res[0];
        if(u.Profile.PermissionsAuthorApex){
            this.editCSS = true;
        }else{
            this.editCSS = false;
        }
    }
}