public GetFeaturePermission ( long subjectId, long featureId ) : |
||
subjectId | long | |
featureId | long | |
Résultat |
public bool SetFeaturePermission(long subjectId, long featureId, int value) { PermissionManager permissionManager = new PermissionManager(); if (value == 2) { permissionManager.DeleteFeaturePermission(subjectId, featureId); return true; } else { FeaturePermission featurePermission = permissionManager.GetFeaturePermission(subjectId, featureId); if (featurePermission != null) { featurePermission.PermissionType = (PermissionType)value; permissionManager.UpdateFeaturePermission(featurePermission); return true; } else { permissionManager.CreateFeaturePermission(subjectId, featureId, (PermissionType)value); return true; } } }