mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-04 18:59:19 +00:00
Fixed solution version, readme, and minor typos
This commit is contained in:
parent
bff42d763f
commit
1f278d77c0
@ -17,7 +17,7 @@ extensions:
|
|||||||
|
|
||||||
## Summary
|
## 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:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -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.
|
This is a port of an Angular 1.3 SharePoint hosted App at https://github.com/russgove/SPSecurity.
|
||||||
|
|
||||||
## Used SharePoint Framework Version
|
## Compatibility
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Applies to
|
## 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)
|
Solution|Author(s)
|
||||||
--------|---------
|
--------|---------
|
||||||
react-securitygrid | Russell Gove
|
react-securitygrid | Russell Gove ([@russgove](https://twitter.com/russgove))
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
Version|Date|Comments
|
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.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.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
|
1.0.0.1|April 25, 2018|Update to SPFx 1.4.1
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
"isDomainIsolated": false,
|
"isDomainIsolated": false,
|
||||||
"name": "spsecurity-webpart-3-client-side-solution",
|
"name": "spsecurity-webpart-3-client-side-solution",
|
||||||
"id": "788271fb-ee9b-40df-8381-eb3dc70d1982",
|
"id": "788271fb-ee9b-40df-8381-eb3dc70d1982",
|
||||||
"version": "1.0.0.3"
|
"version": "1.0.4.0"
|
||||||
},
|
},
|
||||||
"paths": {
|
"paths": {
|
||||||
"zippedPackage": "solution/spsecurity-webpart-3.sppkg"
|
"zippedPackage": "solution/spsecurity-webpart-3.sppkg"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
samples/react-securitygrid/package-lock.json
generated
2
samples/react-securitygrid/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "spsecurity-webpart-3",
|
"name": "spsecurity-webpart-3",
|
||||||
"version": "0.0.1",
|
"version": "1.0.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"name": "spsecurity-webpart-3",
|
"name": "spsecurity-webpart-3",
|
||||||
"version": "0.0.1",
|
"version": "1.0.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
|
@ -416,7 +416,7 @@ export default class SPSecurityService {
|
|||||||
user.id = u.Id;
|
user.id = u.Id;
|
||||||
user.name = u.Title;
|
user.name = u.Title;
|
||||||
user.principalType = u.PrincipalType;
|
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) {
|
if (u.UserId) {
|
||||||
user.userId = new SPExternalUser();
|
user.userId = new SPExternalUser();
|
||||||
user.userId.nameId = u.UserId.NameId;
|
user.userId.nameId = u.UserId.NameId;
|
||||||
@ -426,7 +426,7 @@ export default class SPSecurityService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// securityInfo.siteUsers = securityInfo.siteUsers.filter((su) => { su.upn });
|
// 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) => {
|
}).catch((error) => {
|
||||||
debugger;
|
debugger;
|
||||||
errors.push(`There was an error feting site users -- ${error.message}`);
|
errors.push(`There was an error feting site users -- ${error.message}`);
|
||||||
@ -442,13 +442,13 @@ export default class SPSecurityService {
|
|||||||
securityInfo.siteGroups = response.map((grp) => {
|
securityInfo.siteGroups = response.map((grp) => {
|
||||||
//
|
//
|
||||||
//IMPORTANT:
|
//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",
|
//LoginName: "SharingLinks.cf28991a-7f40-49c8-a68e-f4fa143a094f.OrganizationEdit.2671b36d-1681-4e39-82dc-a9f11166517d",
|
||||||
//
|
//
|
||||||
//For groups create with SPecific People
|
//For groups create with SPecific People
|
||||||
//LoginName: "SharingLinks.3d634d86-7136-4d59-8acf-c87d9a2c7d98.Flexible.9368eb69-6ca4-4b55-85e5-148c3e48e520",
|
//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!
|
//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 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) => {
|
}).catch((error) => {
|
||||||
//error fetching groups
|
//error fetching groups
|
||||||
errors.push(`There was an error feting site Groups -- ${error.message}`);
|
errors.push(`There was an error feting site Groups -- ${error.message}`);
|
||||||
@ -492,8 +492,8 @@ export default class SPSecurityService {
|
|||||||
return securityInfo.roleDefinitions;
|
return securityInfo.roleDefinitions;
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
//debugger;
|
//debugger;
|
||||||
//error fetching roledefinitions
|
//error fetching role definitions
|
||||||
errors.push(`There was an error fetcing role Definitions -- ${error.message}`);
|
errors.push(`There was an error fetching role Definitions -- ${error.message}`);
|
||||||
throw error;
|
throw error;
|
||||||
});
|
});
|
||||||
let filters: string[] = [];
|
let filters: string[] = [];
|
||||||
@ -503,20 +503,20 @@ export default class SPSecurityService {
|
|||||||
if (!showCatalogs) {
|
if (!showCatalogs) {
|
||||||
filters.push("IsCatalog eq false");
|
filters.push("IsCatalog eq false");
|
||||||
}
|
}
|
||||||
let filter: string = filters.join(" and ");
|
let subFilter: string = filters.join(" and ");
|
||||||
sp.web.lists
|
sp.web.lists
|
||||||
.expand("RootFolder", "RoleAssignments", "RoleAssignments/RoleDefinitionBindings", "RoleAssignments/Member",
|
.expand("RootFolder", "RoleAssignments", "RoleAssignments/RoleDefinitionBindings", "RoleAssignments/Member",
|
||||||
"RoleAssignments/Member/Users", "RoleAssignments/Member/Groups", "RoleAssignments/Member/UserId")
|
"RoleAssignments/Member/Users", "RoleAssignments/Member/Groups", "RoleAssignments/Member/UserId")
|
||||||
.filter(filter).inBatch(batch).get()
|
.filter(subFilter).inBatch(batch).get()
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
securityInfo.lists = response.map((listObject) => {
|
securityInfo.lists = response.map((listObject) => {
|
||||||
let mylist: SPList = new SPList();
|
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.title = listObject.Title;
|
||||||
mylist.id = listObject.Id;
|
mylist.id = listObject.Id;
|
||||||
mylist.hidden = listObject.Hidden;
|
mylist.hidden = listObject.Hidden;
|
||||||
mylist.serverRelativeUrl = listObject.RootFolder.ServerRelativeUrl;
|
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.itemCount = listObject.ItemCount;
|
||||||
mylist.isExpanded = false;
|
mylist.isExpanded = false;
|
||||||
mylist.hasBeenRetrieved = false;
|
mylist.hasBeenRetrieved = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user