<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.kth.kthfsdashboard.user;

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author <NAME> <<EMAIL>>
 */
@ManagedBean
@SessionScoped
public class BbcViewController implements Serializable{
    private Username user;
    
    public BbcViewController(){
        
    }
    public String loadLims(){
        if(renderLims()){
            return "lims";
        }
        else{
            return "";
        }
    }
    
    public String loadWorkflows(){
        if(renderWorfkflows()){
            return "workflows";
        }
        else{
            return "";
        }
    }
    public String loadClusters(){
        if(renderClusters()){
            return "clusters";
        }
        else{
            return "";
        }
    }
    public boolean renderLims(){
        return user.getGroups().contains(Group.BBC_ADMIN);
    }
    
    public boolean renderWorfkflows(){
        return user.getGroups().contains(Group.ADMIN) ||user.getGroups().contains(Group.BBC_RESEARCHER);
    }
    
    public boolean renderClusters(){<commit_msg>fixed render for bbc_admin role<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.kth.kthfsdashboard.user;

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author <NAME> <<EMAIL>>
 */
@ManagedBean
@SessionScoped
public class BbcViewController implements Serializable{
    private Username user;
    
    public BbcViewController(){
        
    }
    public String loadLims(){
        if(renderLims()){
            return "lims";
        }
        else{
            return "";
        }
    }
    
    public String loadWorkflows(){
        if(renderWorfkflows()){
            return "workflows";
        }
        else{
            return "";
        }
    }
    public String loadClusters(){
        if(renderClusters()){
            return "clusters";
        }
        else{
            return "";
        }
    }
    public boolean renderLims(){
        return user.getGroups().contains(Group.BBC_ADMIN);
    }
    
    public boolean renderWorfkflows(){
        return user.getGroups().contains(Group.ADMIN) 
                ||user.getGroups().contains(Group.BBC_RESEARCHER)
                ||user.getGroups().contains(Group.BBC_ADMIN);
    }
    
    public boolean renderClusters(){
{'fraction_non_alphanumeric': 0.11167315175097277, 'fraction_numerical': 0.0, 'mean_word_length': 2.053444180522565, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6345331', 'n_tokens_mistral': 747, 'n_tokens_neox': 736, 'n_words': 156}