Examples of DomainGroupModelView


Examples of org.eurekastreams.server.search.modelview.DomainGroupModelView

     * @param inActivityDTO
     *            - current {@link ActivityDTO} to be posted.
     */
    private void performGroupAuthorization(final Principal inPrincipal, final ActivityDTO inActivityDTO)
    {
        DomainGroupModelView currentDomainGroup = domainGroupsByShortNameMapper.fetchUniqueResult(inActivityDTO
                .getDestinationStream().getUniqueIdentifier());

        boolean isUserCoordinator = groupCoordMapper.execute(currentDomainGroup.getEntityId()).contains(
                inPrincipal.getId());

        // if group is public check to see if the current stream interaction is allowed based on configuration,
        // if so then short-circuit.
        if (currentDomainGroup.isPublic())
        {
            if (currentDomainGroup.isStreamPostable() || isUserCoordinator)
            {
                return;
            }
            else
            {
                throw new AuthorizationException("Group is public but the poster is not a "
                        + "coordinator and the group is configured to not allow stream posts.");
            }
        }

        // The group is private, continue forward testing private group authorization.

        if (isUserCoordinator)
        {
            // user is a coordinator
            return;
        }

        if (groupFollowersDAO.execute(currentDomainGroup.getEntityId()).contains(inPrincipal.getId())
                && currentDomainGroup.isStreamPostable())
        {
            // user is a follower
            return;
        }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.