Exemple #1
0
 public void SetRestrictedPath(string pathFromRoot, Access access)
 {
     _AccessConfiguration.SetRestrictedPath(pathFromRoot, access);
 }
Exemple #2
0
        public void AccessConfiguration_SetRestrictedPath_Records_Access_To_Path()
        {
            var access = new Access()
            {
                DefaultAccess = DefaultAccess.Deny
            };

            _Configuration.SetRestrictedPath("/MyPlugin/", access);

            var map = _Configuration.GetRestrictedPathsMap();

            Assert.AreEqual(1, map.Count);
            Assert.AreEqual("/MyPlugin/", map.Single().Key);
            Assert.AreEqual(access, map.Single().Value);
        }