This commit is contained in:
Paul Schneider 2016-06-07 14:32:43 +02:00
commit fa34ed249b
233 changed files with 4000 additions and 1396 deletions

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,50 @@
//
// Publishing.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2015 Paul Schneider
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace Yavsc.Models
{
/// <summary>
/// Publishing.
/// </summary>
public enum Publishing {
/// <summary>
/// In the context of immediate use, with no related stored content.
/// </summary>
None,
/// <summary>
/// In the context of private use of an uploaded content.
/// </summary>
Private,
/// <summary>
/// In the context of restricted access areas, like circle members views.
/// </summary>
Restricted,
/// <summary>
/// Publishing a content in a public access area.
/// </summary>
Public
}
}

View file

@ -0,0 +1,10 @@
using Microsoft.AspNet.Authorization;
namespace Yavsc.Models.Access
{
public abstract class Rule<TResource> where TResource : IAuthorizationRequirement
{
public virtual bool Mandatory { get; set; }
public abstract bool Allow(ApplicationUser user);
}
}

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNet.Authorization;
namespace Yavsc.Models.Access
{
public class RuleSet <TResource>:List<Rule<TResource>> where TResource : IAuthorizationRequirement{
bool Allow(ApplicationUser user)
{
throw new NotImplementedException();
}
}
}

View file

@ -0,0 +1,8 @@
namespace Yavsc.Models.Access
{
public class WhiteCard {
}
}