[3932] | 1 | using System;
|
---|
| 2 | using System.Web.Security;
|
---|
[3951] | 3 | using System.Linq;
|
---|
[3943] | 4 | using Persistence;
|
---|
[3932] | 5 |
|
---|
[3939] | 6 | namespace Service.Provider {
|
---|
| 7 | class HeuristicLabRoleProvider : RoleProvider {
|
---|
| 8 | public override void AddUsersToRoles(string[] usernames, string[] roleNames) {
|
---|
| 9 | throw new NotImplementedException();
|
---|
| 10 | }
|
---|
[3932] | 11 |
|
---|
[3939] | 12 | public override string ApplicationName {
|
---|
| 13 | get {
|
---|
| 14 | throw new NotImplementedException();
|
---|
| 15 | }
|
---|
| 16 | set {
|
---|
| 17 | throw new NotImplementedException();
|
---|
| 18 | }
|
---|
| 19 | }
|
---|
[3932] | 20 |
|
---|
[3939] | 21 | public override void CreateRole(string roleName) {
|
---|
| 22 | throw new NotImplementedException();
|
---|
| 23 | }
|
---|
[3932] | 24 |
|
---|
[3939] | 25 | public override bool DeleteRole(string roleName, bool throwOnPopulatedRole) {
|
---|
| 26 | throw new NotImplementedException();
|
---|
| 27 | }
|
---|
[3932] | 28 |
|
---|
[3939] | 29 | public override string[] FindUsersInRole(string roleName, string usernameToMatch) {
|
---|
| 30 | throw new NotImplementedException();
|
---|
| 31 | }
|
---|
[3932] | 32 |
|
---|
[3939] | 33 | public override string[] GetAllRoles() {
|
---|
| 34 | throw new NotImplementedException();
|
---|
| 35 | }
|
---|
[3932] | 36 |
|
---|
[3939] | 37 | public override string[] GetRolesForUser(string username) {
|
---|
| 38 | throw new NotImplementedException();
|
---|
| 39 | }
|
---|
[3932] | 40 |
|
---|
[3939] | 41 | public override string[] GetUsersInRole(string roleName) {
|
---|
| 42 | throw new NotImplementedException();
|
---|
| 43 | }
|
---|
[3932] | 44 |
|
---|
[3939] | 45 | public override bool IsUserInRole(string username, string roleName) {
|
---|
| 46 | throw new NotImplementedException();
|
---|
| 47 | }
|
---|
[3932] | 48 |
|
---|
[3939] | 49 | public override void RemoveUsersFromRoles(string[] usernames, string[] roleNames) {
|
---|
| 50 | throw new NotImplementedException();
|
---|
| 51 | }
|
---|
[3932] | 52 |
|
---|
[3939] | 53 | public override bool RoleExists(string roleName) {
|
---|
[3951] | 54 |
|
---|
| 55 | Persistence.DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext();
|
---|
| 56 | bool returnValue = (DatabaseUtil.createDataClassesDataContext().HeuristicLabRole.Count(r => r.RoleName == roleName) == 1);
|
---|
| 57 | db.Connection.Close();
|
---|
| 58 | return returnValue;
|
---|
| 59 |
|
---|
[3932] | 60 | }
|
---|
[3939] | 61 | }
|
---|
[3932] | 62 | }
|
---|