Fixed solution version, readme, and minor typos

This commit is contained in:
Hugo Bernier 2021-02-23 00:37:36 -05:00
parent bff42d763f
commit 1f278d77c0
5 changed files with 26 additions and 20 deletions

View File

@ -17,7 +17,7 @@ extensions:
## Summary
React-securitygrid is an SPFX webpart that uses React and Office-UI-Fabric to render a grid showing which users have access to which lists/libraries/folders/files on a Web as shown here:
React-securitygrid is an SPFX web part that uses React and Office-UI-Fabric to render a grid showing which users have access to which lists/libraries/folders/files on a Web as shown here:
![config panel](./src/images/MainDisplay.gif)
@ -80,9 +80,14 @@ The admin can select lists and libraries below to have them included/excluded fr
This is a port of an Angular 1.3 SharePoint hosted App at https://github.com/russgove/SPSecurity.
## Used SharePoint Framework Version
## Compatibility
![SPFx 1.10](https://img.shields.io/badge/SPFx-1.10.0-green.svg)
![Node.js LTS 6.x | LTS 8.x](https://img.shields.io/badge/Node.js-LTS%206.x%20%7C%20LTS%208.x-green.svg)
![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-yellow.svg)
![Teams N/A: Untested with Microsoft Teams](https://img.shields.io/badge/Teams-N%2FA-lightgrey.svg "Untested with Microsoft Teams")
![Workbench Hosted: Does not work with local workbench](https://img.shields.io/badge/Workbench-Hosted-yellow.svg "Does not work with local workbench")
![SPFx 1.10.0](https://img.shields.io/badge/version-1.10-green.svg)
## Applies to
@ -97,12 +102,13 @@ This is a port of an Angular 1.3 SharePoint hosted App at https://github.com/rus
Solution|Author(s)
--------|---------
react-securitygrid | Russell Gove
react-securitygrid | Russell Gove ([@russgove](https://twitter.com/russgove))
## Version history
Version|Date|Comments
-------|----|--------
1.0.0.4|February 22, 2021 | Added support for AD groups
1.0.0.3|October 28, 2020 | Update to office-ui-fabric-react 7.148.1, fixing icons and indentation for sub-folders
1.0.0.2|April 5, 2021| Updates to SPFx 1.10; Allow display of multiple permissions
1.0.0.1|April 25, 2018|Update to SPFx 1.4.1

View File

@ -5,7 +5,7 @@
"isDomainIsolated": false,
"name": "spsecurity-webpart-3-client-side-solution",
"id": "788271fb-ee9b-40df-8381-eb3dc70d1982",
"version": "1.0.0.3"
"version": "1.0.4.0"
},
"paths": {
"zippedPackage": "solution/spsecurity-webpart-3.sppkg"

View File

@ -1,6 +1,6 @@
{
"name": "spsecurity-webpart-3",
"version": "0.0.1",
"version": "1.0.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,7 +1,7 @@
{
"main": "lib/index.js",
"name": "spsecurity-webpart-3",
"version": "0.0.1",
"version": "1.0.4",
"private": true,
"engines": {
"node": ">=0.10.0"

View File

@ -416,7 +416,7 @@ export default class SPSecurityService {
user.id = u.Id;
user.name = u.Title;
user.principalType = u.PrincipalType;
user.upn = upn ? upn.toLocaleLowerCase() : u.Title;// switching key in react from id to upn. ensure upn is not undefoined
user.upn = upn ? upn.toLocaleLowerCase() : u.Title;// switching key in react from id to upn. ensure upn is not undefined
if (u.UserId) {
user.userId = new SPExternalUser();
user.userId.nameId = u.UserId.NameId;
@ -426,7 +426,7 @@ export default class SPSecurityService {
});
// securityInfo.siteUsers = securityInfo.siteUsers.filter((su) => { su.upn });
return securityInfo.siteUsers;// dont really need to return this// alreadey set it on securityinfo
return securityInfo.siteUsers;// dont really need to return this// already set it on securityinfo
}).catch((error) => {
debugger;
errors.push(`There was an error feting site users -- ${error.message}`);
@ -442,13 +442,13 @@ export default class SPSecurityService {
securityInfo.siteGroups = response.map((grp) => {
//
//IMPORTANT:
//For groups created with 'Anyone in the orgranization with the link'
//For groups created with 'Anyone in the organization with the link'
//LoginName: "SharingLinks.cf28991a-7f40-49c8-a68e-f4fa143a094f.OrganizationEdit.2671b36d-1681-4e39-82dc-a9f11166517d",
//
//For groups create with SPecific People
//LoginName: "SharingLinks.3d634d86-7136-4d59-8acf-c87d9a2c7d98.Flexible.9368eb69-6ca4-4b55-85e5-148c3e48e520",
//
//need to check for other options. Seems funny that the one labeled 'Flecible' is for specific people.
//need to check for other options. Seems funny that the one labeled 'Flexible' is for specific people.
//
//So we wil need to add code one day to decipher all thes sharing groups!
@ -466,7 +466,7 @@ export default class SPSecurityService {
return siteGroup;
});
return securityInfo.siteGroups;// dont really need to return this// alreadey set it on securityinfo
return securityInfo.siteGroups;// don't really need to return this// already set it on securityinfo
}).catch((error) => {
//error fetching groups
errors.push(`There was an error feting site Groups -- ${error.message}`);
@ -492,8 +492,8 @@ export default class SPSecurityService {
return securityInfo.roleDefinitions;
}).catch((error) => {
//debugger;
//error fetching roledefinitions
errors.push(`There was an error fetcing role Definitions -- ${error.message}`);
//error fetching role definitions
errors.push(`There was an error fetching role Definitions -- ${error.message}`);
throw error;
});
let filters: string[] = [];
@ -503,20 +503,20 @@ export default class SPSecurityService {
if (!showCatalogs) {
filters.push("IsCatalog eq false");
}
let filter: string = filters.join(" and ");
let subFilter: string = filters.join(" and ");
sp.web.lists
.expand("RootFolder", "RoleAssignments", "RoleAssignments/RoleDefinitionBindings", "RoleAssignments/Member",
"RoleAssignments/Member/Users", "RoleAssignments/Member/Groups", "RoleAssignments/Member/UserId")
.filter(filter).inBatch(batch).get()
.filter(subFilter).inBatch(batch).get()
.then((response) => {
securityInfo.lists = response.map((listObject) => {
let mylist: SPList = new SPList();
mylist.isSelected = true;// Shoudl be shown in the UI, user can deslect it in the ui
mylist.isSelected = true;// Should be shown in the UI, user can de-select it in the ui
mylist.title = listObject.Title;
mylist.id = listObject.Id;
mylist.hidden = listObject.Hidden;
mylist.serverRelativeUrl = listObject.RootFolder.ServerRelativeUrl;
mylist.type = securableType.List;// to differeentiate foldes from lists
mylist.type = securableType.List;// to differentiate folders from lists
mylist.itemCount = listObject.ItemCount;
mylist.isExpanded = false;
mylist.hasBeenRetrieved = false;