How can i get module name in app:sync:complete

I am trying  to  get module name in app:sync:complete . 

i tried 

(function(app) {
app.events.on("app:sync:complete", function() {

var acls = app.user.getAcls();

acls.fpalt_FPalTickets.create = 'no';

var self = this;
console.log('module',app);

//console.log("online 14: ",acls);
app.user.set("acls", acls);

//acls.
console.log('module',app.module);
console.log('module',acls.module);
});
})(SUGAR.App);

but it not working , how can i can current module name

.....

i also tried 

var currentViewId=app.modules.analytics.currentViewId;
        console.log('currentViewId',currentViewId);
        console.log('analytics',app.modules.analytics);

        console.log('currentViewId 1',app.modules.analytics["currentViewId"]);

        console.log('app.user',app.user);

        if(currentViewId=='records/Leads')
        {
            acls.fpalt_FPalTickets.create = 'no';
        }
        else
        {
            acls.fpalt_FPalTickets.create = 'yes';
        }
Parents Reply
  • also tried 

    var currentViewId=app.modules.analytics.currentViewId;
            console.log('currentViewId',currentViewId);
            console.log('analytics',app.modules.analytics);

            console.log('currentViewId 1',app.modules.analytics["currentViewId"]);

            console.log('app.user',app.user);

            if(currentViewId=='records/Leads')
            {
                acls.fpalt_FPalTickets.create = 'no';
            }
            else
            {
                acls.fpalt_FPalTickets.create = 'yes';
            }
Children
No Data