<commit_before>package v1

import (
	"github.com/osuripple/api/common"
)

type privilegesData struct {
	PrivilegeRead             bool `json:"read"`
	PrivilegeReadConfidential bool `json:"read_confidential"`
	PrivilegeWrite            bool `json:"write"`
	PrivilegeManageBadges     bool `json:"manage_badges"`
	PrivilegeBetaKeys         bool `json:"beta_keys"`
	PrivilegeManageSettings   bool `json:"manage_settings"`
	PrivilegeViewUserAdvanced bool `json:"view_user_advanced"`
	PrivilegeManageUser       bool `json:"manage_user"`
	PrivilegeManageRoles      bool `json:"manage_roles"`
	PrivilegeManageAPIKeys    bool `json:"manage_api_keys"`
	PrivilegeBlog             bool `json:"blog"`
	PrivilegeAPIMeta          bool `json:"api_meta"`
}

// PrivilegesGET returns an explaination for the privileges, telling the client what they can do with this token.
func PrivilegesGET(md common.MethodData) (r common.Response) {
	// This code sucks.
	r.Code = 200
	r.Data = privilegesData{
		PrivilegeRead:             md.User.Privileges.HasPrivilegeRead(),
		PrivilegeReadConfidential: md.User.Privileges.HasPrivilegeReadConfidential(),
		PrivilegeWrite:            md.User.Privileges.HasPrivilegeWrite(),
		PrivilegeManageBadges:     md.User.Privileges.HasPrivilegeManageBadges(),
		PrivilegeBetaKeys:         md.User.Privileges.HasPrivilegeBetaKeys(),
		PrivilegeManageSettings:   md.User.Privileges.HasPrivilegeManageSettings(),
		PrivilegeViewUserAdvanced: md.User.Privileges.HasPrivilegeViewUserAdvanced(),
		PrivilegeManageUser:       md.User.Privileges.HasPrivilegeManageUser(),
		PrivilegeManageRoles:      md.User.Privileges.HasPrivilegeManageRoles(),
		PrivilegeManageAPIKeys:    md.User.Privileges.HasPrivilegeManageAPIKeys(),
		PrivilegeBlog:             md.User.Privileges.HasPrivilegeBlog(),
		PrivilegeAPIMeta:          md.User.Privileges.HasPrivilegeAPIMeta(),
	}
	return
}
<commit_msg>Remove useless stuff from privileges<commit_after>package v1

import (
	"github.com/osuripple/api/common"
)

type privilegesData struct {
	Read             bool `json:"read"`
	ReadConfidential bool `json:"read_confidential"`
	Write            bool `json:"write"`
	ManageBadges     bool `json:"manage_badges"`
	BetaKeys         bool `json:"beta_keys"`
	ManageSettings   bool `json:"manage_settings"`
	ViewUserAdvanced bool `json:"view_user_advanced"`
	ManageUser       bool `json:"manage_user"`
	ManageRoles      bool `json:"manage_roles"`
	ManageAPIKeys    bool `json:"manage_api_keys"`
	Blog             bool `json:"blog"`
	APIMeta          bool `json:"api_meta"`
}

// PrivilegesGET returns an explaination for the privileges, telling the client what they can do with this token.
func PrivilegesGET(md common.MethodData) (r common.Response) {
	// This code sucks.
	r.Code = 200
	r.Data = privilegesData{
		Read:             md.User.Privileges.HasPrivilegeRead(),
		ReadConfidential: md.User.Privileges.HasPrivilegeReadConfidential(),
		Write:            md.User.Privileges.HasPrivilegeWrite(),
		ManageBadges:     md.User.Privileges.HasPrivilegeManageBadges(),
		BetaKeys:         md.User.Privileges.HasPrivilegeBetaKeys(),
		ManageSettings:   md.User.Privileges.HasPrivilegeManageSettings(),
		ViewUserAdvanced: md.User.Privileges.HasPrivilegeViewUserAdvanced(),
		ManageUser:       md.User.Privileges.HasPrivilegeManageUser(),
		ManageRoles:      md.User.Privileges.HasPrivilegeManageRoles(),
		ManageAPIKeys:    md.User.Privileges.HasPrivilegeManageAPIKeys(),
		Blog:             md.User.Privileges.HasPrivilegeBlog(),
		APIMeta:          md.User.Privileges.HasPrivilegeAPIMeta(),
	}
	return
}

{'fraction_non_alphanumeric': 0.09913673071567808, 'fraction_numerical': 0.002227791701475912, 'mean_word_length': 4.138769670958512, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2055697', 'n_tokens_mistral': 1242, 'n_tokens_neox': 1178, 'n_words': 198}