https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38446

--- Comment #17 from Michaela Sieber <[email protected]> ---
We startet to use the ERM module in our production system and this is our
workaround for protecting the system administration page for additional fields:

Snippet for IntranetUserJS

// Hide the additional field view for everyone that is not a superlibrarian
(function() {    

    // check if on additional fields page
        if (document.querySelector('body#ser_add_fields')) {

        // check if logged in use is superlibrarian
        const isSuperLibrarian =
document.querySelector('span.loggedinusername.is_superlibrarian');

        // remove all content in the additional field main view
        if (!isSuperLibrarian){
            document.querySelector('main').innerHTML='';
        }
    }
})();

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to