AM
(function($){
function get_current_user(){
return JIRA.Meta.getLoggedInUser().name || $('meta[name="ajs-remote-user"]').attr('content');
}
function hide_issue_type(issue_type_name){
$('head').append('<style type="text/css">.aui-list-item-li-'+issue_type_name.toLowerCase().replace(/(\s)|( )/g, '-')+' { display: none; }</style>');
}
var user = get_current_user();
var allowed_groups = ['[SUVSOZ]'];
$.ajax({
type: 'GET',
url: '/rest/api/2/user?username='+user+'&expand=groups',
dataType: 'json',
contentType: 'application/json',
success: function(data) {
var access = false;
data.groups.items.forEach(function(group){
if(allowed_groups.indexOf(group.name) !== -1) {
access = true;
}
});
if (access) {
(AJS.$("#sidebar-discover .nav-item-all-updates").length > 0) {
AJS.$("#sidebar-discover .nav-item-all-updates").hide();
AJS.$("#sidebar-discover .nav-item-popular-stream").hide();
AJS.$("#sidebar-discover > div > div > strong").hide()
return;
}
}
});
})(AJS.$);
</script>
<style>
#project-single-select,#project-field { max-width:450px !important; }
</style>


