using System; using System.Linq; namespace Kreta.BusinessLogic.Security { public static class KretaClaimPackages { public const string ClaimType = KretaClaimTypes.Package; public const string ResourceClaimType = KretaClaimTypes.Resource; public static string GetPackageNameToResource(string resourceName) { if (Adminisztrator.HasResource(resourceName)) return Adminisztrator.ClaimValue; if (Naplo.HasResource(resourceName)) return Naplo.ClaimValue; if (Ellenorzo.HasResource(resourceName)) return Ellenorzo.ClaimValue; if (PenzugyiAdmin.HasResource(resourceName)) return PenzugyiAdmin.ClaimValue; if (BelepokartyaAdmin.HasResource(resourceName)) return BelepokartyaAdmin.ClaimValue; if (LeltarConcerned.HasResource(resourceName)) return LeltarConcerned.ClaimValue; if (Penztaros.HasResource(resourceName)) return Penztaros.ClaimValue; if (Alairo.HasResource(resourceName)) return Alairo.ClaimValue; if (eUgyintezo.HasResource(resourceName)) return eUgyintezo.ClaimValue; if (EtkezesiAdmin.HasResource(resourceName)) return EtkezesiAdmin.ClaimValue; if (EtkezesiEllenorzo.HasResource(resourceName)) return EtkezesiEllenorzo.ClaimValue; if (TeremberletJelenletEllenorzo.HasResource(resourceName)) return TeremberletJelenletEllenorzo.ClaimValue; if (Alkalmazott.HasResource(resourceName)) return Alkalmazott.ClaimValue; if (FokuszMonitoring.HasResource(resourceName)) return FokuszMonitoring.ClaimValue; if (Rendszergazda.HasResource(resourceName)) return Rendszergazda.ClaimValue; if (Osztalyfonok.HasResource(resourceName)) return Osztalyfonok.ClaimValue; if (Evfolyamfelelos.HasResource(resourceName)) return Evfolyamfelelos.ClaimValue; if (IsSzakiranyuOktatasertFelelos.HasResource(resourceName)) return IsSzakiranyuOktatasertFelelos.ClaimValue; if (CsoportVezeto.HasResource(resourceName)) return CsoportVezeto.ClaimValue; if (SzuperOsztalyfonok.HasResource(resourceName)) return SzuperOsztalyfonok.ClaimValue; if (IsDualisKepzohelyiOktato.HasResource(resourceName)) return IsDualisKepzohelyiOktato.ClaimValue; if (Gondviselo.HasResource(resourceName)) return Gondviselo.ClaimValue; if (TanarAdhatMagatartasSzorgalomJegyet.HasResource(resourceName)) return TanarAdhatMagatartasSzorgalomJegyet.ClaimValue; if (FelhasznaloMunkakoreNemTiltoListas.HasResource(resourceName)) return FelhasznaloMunkakoreNemTiltoListas.ClaimValue; if (EllenorzobenLathatoOsztalyatlag.HasResource(resourceName)) return EllenorzobenLathatoOsztalyatlag.ClaimValue; if (Tanar.HasResource(resourceName)) return Tanar.ClaimValue; if (Tanulo.HasResource(resourceName)) return Tanulo.ClaimValue; if (Szuperadmin.HasResource(resourceName)) return Szuperadmin.ClaimValue; if (TanuloKezelese.HasResource(resourceName)) return TanuloKezelese.ClaimValue; if (FeleviJegy.HasResource(resourceName)) return FeleviJegy.ClaimValue; if (EvvegiJegy.HasResource(resourceName)) return EvvegiJegy.ClaimValue; if (EvvegiVegzosJegy.HasResource(resourceName)) return EvvegiVegzosJegy.ClaimValue; if (IsKozossegiSzolgalatKezelo.HasResource(resourceName)) return IsKozossegiSzolgalatKezelo.ClaimValue; if (IskolaEgeszsegugyiKoordinator.HasResource(resourceName)) return IskolaEgeszsegugyiKoordinator.ClaimValue; if (Vedono.HasResource(resourceName)) return Vedono.ClaimValue; if (Iskolaorvos.HasResource(resourceName)) return Iskolaorvos.ClaimValue; if (IskolaEgeszsegugyiAsszisztens.HasResource(resourceName)) return IskolaEgeszsegugyiAsszisztens.ClaimValue; if (IskolaEgeszsegugyiLekerdezo.HasResource(resourceName)) return IskolaEgeszsegugyiLekerdezo.ClaimValue; if (Konyvtaros.HasResource(resourceName)) return Konyvtaros.ClaimValue; throw new ArgumentOutOfRangeException(); } #region Role claimek public class Adminisztrator { public const string ClaimValue = "Adminisztrator"; public static class Resources { public const string Lehet_orat_felvenni_TTF_nelkul = "Lehet_orat_felvenni_TTF_nelkul"; public static string[] All = new[] { Lehet_orat_felvenni_TTF_nelkul }; } public static bool HasResource(string resourceName) { return false; } } public class Naplo { public const string ClaimValue = "Naplo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Ellenorzo { public const string ClaimValue = "Ellenorzo"; public static class Resources { public const string A_felhasznalok_nem_valtoztathatjak_meg_a_jelszavukat_az_elektronikus_ellenorzoben = "A_felhasznalok_nem_valtoztathatjak_meg_a_jelszavukat_az_elektronikus_ellenorzoben"; } public static bool HasResource(string resourceName) { return false; } } #endregion #region Package claimek public class Rendszergazda { public const string ClaimValue = "Rendszergazda"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } public static bool IsValid() { return false; } } public class Szuperadmin { public const string ClaimValue = "Szuperadmin"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } public static bool IsValid() { return false; } } public class Osztalyfonok { public const string ClaimValue = "Osztalyfonok"; public static class Resources { public const string Osztalyfonok_modosithatja_osztalyaba_jaro_tanulok_adatait = "ofo_tanulo_kezelese"; public const string Osztalyfonok_megtekintheti_modosithatja_osztalyaba_jaro_tanulok_szocialis_tanugyi_es_SNI_BTM_adatait = "ofo_tanulo_SNI_BTM_kezelese"; public const string Osztalyfonok_megtekintheti_kezelheti_az_osztalyaba_jaro_tanulok_vallasi_adatait = "ofo_tanulo_vallas_kezelese"; public const string Osztalyfonok_megtekintheti_kezelheti_az_osztalyaba_jaro_tanulok_sportoloi_adatait = "ofo_tanulo_sport_kezelese"; public const string Osztalyfonok_megtekintheti_modosithatja_osztalyaba_jaro_tanulok_zaradekat = "ofo_tanulo_zaradek_kezelese"; public const string Osztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_vegzaradekat = "ofo_tanulo_vegzaradek_kezelese"; public static string[] All = new[] { Osztalyfonok_modosithatja_osztalyaba_jaro_tanulok_adatait, Osztalyfonok_megtekintheti_modosithatja_osztalyaba_jaro_tanulok_szocialis_tanugyi_es_SNI_BTM_adatait, Osztalyfonok_megtekintheti_kezelheti_az_osztalyaba_jaro_tanulok_vallasi_adatait, Osztalyfonok_megtekintheti_kezelheti_az_osztalyaba_jaro_tanulok_sportoloi_adatait, Osztalyfonok_megtekintheti_modosithatja_osztalyaba_jaro_tanulok_zaradekat, Osztalyfonok_kiegeszitheti_osztalyaba_jaro_tanulok_vegzaradekat }; } public static bool HasResource(string resourceName) { return (Resources.All.Contains(resourceName)); } } public class Evfolyamfelelos { public const string ClaimValue = "Evfolyamfelelos"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsSzakiranyuOktatasertFelelos { public const string ClaimValue = "IsSzakiranyuOktatasertFelelos"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class CsoportVezeto { public const string ClaimValue = "CsoportVezeto"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class SzuperOsztalyfonok { public const string ClaimValue = "SzuperOsztalyfonok"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Tanar { public const string ClaimValue = "Tanar"; public static class Resources { public const string Pedagogusok_sajat_orarendjeiket_modosithatjak_az_elektronikus_naploban = "sajat_orarendjeiket_modosithatjak"; public const string Pedagogusok_csak_az_eloirt_helyettesiteseiket_regisztralhatjak_a_haladasi_naploban = "csak_az_eloirt_helyettesiteseiket_regisztralhatjak"; public const string A_haladasi_naploba_orankent_csak_egy_tanora_rogzitheto = "orankent_csak_egy_tanora_rogzitheto"; public static string[] All = new[] { Pedagogusok_sajat_orarendjeiket_modosithatjak_az_elektronikus_naploban, Pedagogusok_csak_az_eloirt_helyettesiteseiket_regisztralhatjak_a_haladasi_naploban, A_haladasi_naploba_orankent_csak_egy_tanora_rogzitheto }; } public static bool HasResource(string resourceName) { return Resources.All.Contains(resourceName); } } public class Gondviselo { public const string ClaimValue = "Gondviselo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class SZMKKepviselo { public const string ClaimValue = nameof(SZMKKepviselo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class eUgyintezo { public const string ClaimValue = nameof(eUgyintezo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Alairo { public const string ClaimValue = nameof(Alairo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Penztaros { public const string ClaimValue = nameof(Penztaros); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class PenzugyiAdmin { public const string ClaimValue = nameof(PenzugyiAdmin); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class BelepokartyaAdmin { public const string ClaimValue = nameof(BelepokartyaAdmin); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class KerdoivKitolto_KerdoivKezelo { public const string ClaimValue = nameof(KerdoivKitolto_KerdoivKezelo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Dualis_Admin { public const string ClaimValue = nameof(Dualis_Admin); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class LeltarConcerned { public const string ClaimValue = "LELTAR_CONCERNED"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FELTAR_EsetKezelo { public const string ClaimValue = "FELTAR_EsetKezelo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FELTAR_EszkozMenedzser { public const string ClaimValue = "FELTAR_EszkozMenedzser"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FELTAR_EsetJovahagyo { public const string ClaimValue = "FELTAR_EsetJovahagyo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FELTAR_EsetKozremukodo { public const string ClaimValue = "FELTAR_EsetKozremukodo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FELTAR_Munkavegzo { public const string ClaimValue = "FELTAR_Munkavegzo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FELTAR_SzerzodesMenedzser { public const string ClaimValue = "FELTAR_SzerzodesMenedzser"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class EtkezesiAdmin { public const string ClaimValue = nameof(EtkezesiAdmin); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class EtkezesiEllenorzo { public const string ClaimValue = nameof(EtkezesiEllenorzo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FokuszMonitoring { public const string ClaimValue = nameof(FokuszMonitoring); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class TeremberletJelenletEllenorzo { public const string ClaimValue = nameof(TeremberletJelenletEllenorzo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Alkalmazott { public const string ClaimValue = nameof(Alkalmazott); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class CsokkentettGondviselo { public const string ClaimValue = "CsokkentettGondviselo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class EllenorzobenLathatoOsztalyatlag { public const string ClaimValue = "EllenorzobenLathatoOsztalyatlag"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class TanarAdhatMagatartasSzorgalomJegyet { public const string ClaimValue = "TanarAdhatMagatartasSzorgalomJegyet"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FelhasznaloMunkakoreNemTiltoListas { public const string ClaimValue = nameof(FelhasznaloMunkakoreNemTiltoListas); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Tanulo { public const string ClaimValue = "Tanulo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class TanuloKezelese { public const string ClaimValue = "TanuloKezelese"; public static class Resources { public const string Tanulo_sajatos_nevelesi_igenyenek_szocialis_es_tanugyi_adatainak_kezelese = "SNI_BTM_kezelese"; public const string Tanulo_vallasi_adatainak_kezelese = "vallas_kezelese"; public const string Tanulo_sportoloi_adatainak_kezelese = "sport_kezelese"; public static string[] All = new[] { Tanulo_sajatos_nevelesi_igenyenek_szocialis_es_tanugyi_adatainak_kezelese, Tanulo_vallasi_adatainak_kezelese, Tanulo_sportoloi_adatainak_kezelese }; } public static bool HasResource(string resourceName) { return Resources.All.Contains(resourceName); } } public class TanarOrarendSzerkesztes { public const string ClaimValue = "TanarOrarendSzerkesztes"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } public static bool IsValid() { return false; } } public class FeleviJegy { public const string ClaimValue = "FeleviJegy"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class EvvegiJegy { public const string ClaimValue = "EvvegiJegy"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class EvvegiVegzosJegy { public const string ClaimValue = "EvvegiVegzosJegy"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsKozossegiSzolgalatKezelo { public const string ClaimValue = "IsKozossegiSzolgalatKezelo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsLEPKezelo { public const string ClaimValue = nameof(IsLEPKezelo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsOnlyAlkalmozott { public const string ClaimValue = nameof(IsOnlyAlkalmozott); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsCsokkentettAdminJog { public const string ClaimValue = nameof(IsCsokkentettAdminJog); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsModosithatjaOsztfoMulasztasokat { public const string ClaimValue = nameof(IsModosithatjaOsztfoMulasztasokat); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class DiakolimpiaKezelo { public const string ClaimValue = "DiakolimpiaKezelo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class AMImodul { public const string ClaimValue = "AMImodul"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class KollegiumModul { public const string ClaimValue = "KollegiumModul"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class FelnottkepzesModul { public const string ClaimValue = "FelnottkepzesModul"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class EGYMIModul { public const string ClaimValue = "EGYMIModul"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class TavolletIgenylo { public const string ClaimValue = "TavolletIgenylo"; public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class GazdasagiUgyintezo { public const string ClaimValue = nameof(GazdasagiUgyintezo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class KKGazdasagiUgyintezo { public const string ClaimValue = nameof(KKGazdasagiUgyintezo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IskolaEgeszsegugyiKoordinator { public const string ClaimValue = nameof(IskolaEgeszsegugyiKoordinator); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Vedono { public const string ClaimValue = nameof(Vedono); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Iskolaorvos { public const string ClaimValue = nameof(Iskolaorvos); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IskolaEgeszsegugyiAsszisztens { public const string ClaimValue = nameof(IskolaEgeszsegugyiAsszisztens); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IskolaEgeszsegugyiLekerdezo { public const string ClaimValue = nameof(IskolaEgeszsegugyiLekerdezo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsSzirIntezmeny { public const string ClaimValue = nameof(IsSzirIntezmeny); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsSzakkepzoIntezmeny { public const string ClaimValue = nameof(IsSzakkepzoIntezmeny); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsDefaultAdminUser { public const string ClaimValue = nameof(IsDefaultAdminUser); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsArchivIntezmeny { public const string ClaimValue = nameof(IsArchivIntezmeny); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IskolaOr { public const string ClaimValue = nameof(IskolaOr); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class Konyvtaros { public const string ClaimValue = nameof(Konyvtaros); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsDualisKepzohelyiOktato { public const string ClaimValue = nameof(IsDualisKepzohelyiOktato); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsFeltarAlkalmazott { public const string ClaimValue = nameof(IsFeltarAlkalmazott); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsFeltarTanulo { public const string ClaimValue = nameof(IsFeltarTanulo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsFeltarGondviselo { public const string ClaimValue = nameof(IsFeltarGondviselo); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } public class IsPortas { public const string ClaimValue = nameof(IsPortas); public static class Resources { } public static bool HasResource(string resourceName) { return false; } } #endregion } }