fix limits on sharing, account for both members and invites.

This commit is contained in:
Shane Kilkelly 2016-09-06 09:37:53 +01:00
parent ab2fe1de97
commit c8ee803570

View file

@ -19,7 +19,7 @@ define [
, 200 , 200
INFINITE_COLLABORATORS = -1 INFINITE_COLLABORATORS = -1
$scope.$watch "project.members.length", (noOfMembers) -> $scope.$watch "(project.members.length + project.invites.length)", (noOfMembers) ->
allowedNoOfMembers = $scope.project.features.collaborators allowedNoOfMembers = $scope.project.features.collaborators
$scope.canAddCollaborators = noOfMembers < allowedNoOfMembers or allowedNoOfMembers == INFINITE_COLLABORATORS $scope.canAddCollaborators = noOfMembers < allowedNoOfMembers or allowedNoOfMembers == INFINITE_COLLABORATORS