Load Viewers based on Username

955
0
07-19-2016 04:31 AM
Chinnayadav
New Contributor


I have two viewers file in cmv? one with the editor tool option in it and the other without?Based on the user login the viewer should load as per the access given for editing?

var file = 'config/viewer', s = window.location.search, q = s.match(/config=([^&]*)/i);

            if (q && q.length > 0) {

                file = q[1];

                if (file.indexOf('/') < 0) {

                    file = 'config/' + file;

                }

            }

var file = 'config/viewer2', s = window.location.search, q = s.match(/config=([^&]*)/i);

            if (q && q.length > 0) {

                file = q[1];

                if (file.indexOf('/') < 0) {

                    file = 'config/' + file;

                }

            }

0 Kudos
0 Replies