Skip to content

Commit

Permalink
Merge pull request 'Release/1.0.0' (#4) from develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
LinneyS committed Sep 25, 2024
2 parents 5b34b1c + 7c51d6a commit 42a9411
Show file tree
Hide file tree
Showing 252 changed files with 35,106 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

target/
build/
.env

# dependencies
frontend/node_modules
3 changes: 3 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Authors

* Ascensio System SIA: <[email protected]>
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

## 1.0.0
## Added
- settings page
- adding a room to a deal
- adding/removing deal subscribers to a room when adding/removing in a deal
- adding/removing a general group to a room when the visibility of a deal changes
- room access request button
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:current-alpine AS build-frontend
LABEL maintainer Ascensio System SIA <[email protected]>
ARG BACKEND_URL
ENV BACKEND_URL=$BACKEND_URL
WORKDIR /usr/src/app
COPY ./frontend/package*.json ./
COPY ./frontend/onlyoffice-docspace-react*.tgz ./
RUN npm install
COPY frontend .
RUN npm run build

FROM eclipse-temurin:21-jdk-jammy AS backend
WORKDIR /app
COPY ./backend/.mvn/ .mvn
COPY ./backend/mvnw ./backend/pom.xml ./
RUN chmod +x mvnw
RUN ./mvnw dependency:resolve
COPY ./backend/src ./src
CMD ["./mvnw", "spring-boot:run"]

FROM nginx:alpine AS frontend
COPY --from=build-frontend \
/usr/src/app/build \
/usr/share/nginx/html
COPY --from=build-frontend \
/usr/src/app/nginx/nginx.conf \
/etc/nginx/conf.d/default.conf
EXPOSE 80
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ONLYOFFICE DocSpace app for Pipedrive

This app allows working with office files related to your [Pipedrive Deals](https://www.pipedrive.com/) in ONLYOFFICE DocSpace rooms.

## App installation and configuration

ONLYOFFICE DocSpace app can be installed via the Pipedrive Marketplace. **Please note:** each user needs to install the DocSpace app themselves. The Pipedrive admin is not able to install the app for everyone at once.

The Pipedrive admin can configure the app via the **Marketplace apps** section within Pipedrive: Tools and apps -> Marketplace apps -> ONLYOFFICE DocSpace app.

### Connection settings (for Pipedrive administrators)

At first, go to your DocSpace -> Developer Tools -> JavaScript SDK. Add the addresses of your Pipedrive and ONLYOFFICE DocSpace in the section **Enter the address of DocSpace to embed**.

Once done, go the ONLYOFFICE DocSpace app settings within Pipedrive, fill in the **DocSpace Service Address** field and click the Connect button.

If the connection is successful, two buttons will appear on this page:

- **Change**: ability to connect another DocSpace. The data in the current DocSpace will not be deleted.
- **Disconnect**: completely disables the app (clearing user authorization and hooks). In this case, the connection of the Pipedrive Users group with Pipedrive will be removed. We recommended using this option only if there is a need to completely clear data in the DocSpace app.

### Authorization settings (for Pipedrive administrators)

This section is available once the **Connection settings** are configured.

Here, enter the DocSpace login and password.

For users with the Deal Admin role, the **System User** checkbox is shown. By default, if no user who has installed the DocSpace app is a System User, this checkbox will be enabled and cannot be disabled. Until a System User is set, other DocSpace users cannot log in.

If you need the System User to be linked to another account, another user with the Deal Admin rights can enable the System User checkbox when logging in.

### Authorization settings (for regular Pipedrive users)

Once the previous steps have been completed by the Pipedrive administrator, regular Pipedrive users can log into DocSpace with their credentials.

## App usage

The ONLYOFFICE DocSpace app for Pipedrive can be accessed via the Deals section of Pipedrive: go to the corresponding deal and find the DocSpace frame.

For each deal, you can create a separate DocSpace room in which the deal participants can work together on office documents. To create a room, click the **Create room** button.

The room is named according to the rule *Pipedrive - Company name - Deal name*. Inside the DocSpace frame, deal participants can work depending on their access rights.

### Access rights

All Pipedrive users who logged into the DocSpace app are added to the **Pipedrive Users (Company Name)** group. If a user logs out of DocSpace, they will be removed from the group.

Access rights to the room within a deal are determined by the Pipedrive access rights to the corresponding deal.

- **All users**: the room becomes available to the Pipedrive Users group as well as the followers are invited by name (only those who have installed the DocSpace app and have been authorized).
- **Item owner**: the room is accessible only to the deal owner and the followers by name. A mandatory condition in this case is that the deal owner and the followers must install the DocSpace app and pass authorization.
- **Item owner’s visibility group**: only the followers are synchronized (available in the paid version of Pipedrive).
- **Item owner’s visibility group and sub-group**: only the followers are synchronized (available in the paid version of Pipedrive).

## Important to know

If a Pipedrive user does not have access to the room within a deal, they can request access by clicking on the corresponding button. This action checks whether the user should have access to the room. If they should, the user is added to the room based on the Access Rights. If they should not, the corresponding notification is shown.
## Project info

Official website: [www.onlyoffice.com](https://www.onlyoffice.com/)

Code repository: [github.com/ONLYOFFICE/onlyoffice-docspace-pipedrive](https://github.com/ONLYOFFICE/onlyoffice-docspace-pipedrive)

## User feedback and support

In case of technical problems, the best way to get help is to submit your issues [here](https://github.com/ONLYOFFICE/onlyoffice-docspace-pipedrive/issues).
Alternatively, you can contact ONLYOFFICE team on [forum.onlyoffice.com](https://forum.onlyoffice.com/).
Binary file added backend/.mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions backend/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
78 changes: 78 additions & 0 deletions backend/3rd-Party.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
DocSpace integration into Pipedrive uses code from the following 3rd party projects:


org.springframework.boot.spring-boot-starter-data-jpa - Starter for using Spring Data JPA with Hibernate. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.boot.spring-boot-starter-data-jpa.license

org.springframework.boot.spring-boot-starter-oauth2-client - Starter for using Spring Security's OAuth2/OpenID Connect client features. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.boot.spring-boot-starter-oauth2-client.license

org.springframework.boot.spring-boot-starter-oauth2-resource-server - Starter for using Spring Security's OAuth2 resource server features. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.boot.spring-boot-starter-oauth2-resource-server.license

org.springframework.session.spring-session-data-redis - Spring Session Redis implementation. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.session.spring-session-data-redis.license

org.springframework.boot.spring-boot-starter-data-redis - Starter for using Redis key-value data store with Spring Data Redis and the Lettuce client. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.boot.spring-boot-starter-data-redis.license

org.springframework.boot.spring-boot-starter-web - Starter for building web, including RESTful, applications using Spring MVC. Uses Tomcat as the default embedded container. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.boot.spring-boot-starter-web.license

org.springframework.boot.spring-boot-starter-webflux - Starter for building WebFlux applications using Spring Framework's Reactive Web support. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.boot.spring-boot-starter-webflux.license

javax.xml.bind.jaxb-api - JAXB provides an API and tools that automate the mapping between XML documents and Java objects. (https://oss.oracle.com/licenses/CDDL+GPL-1.1)
License: CDDL 1.1, GPL2 w/ CPE
License File: javax.xml.bind.jaxb-api.license

org.mapstruct.mapstruct - An annotation processor for generating type-safe bean mappers. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.mapstruct.mapstruct.license

org.mapstruct.mapstruct-processor - An annotation processor for generating type-safe bean mappers. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.mapstruct.mapstruct-processor.license

net.logstash.logback.logstash-logback-encoder - Provides logback encoders, layouts, and appenders to log in JSON and other formats supported by Jackson. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: net.logstash.logback.logstash-logback-encoder.license

org.postgresql.postgresql - PostgreSQL JDBC Driver Postgresql (https://jdbc.postgresql.org/about/license.html)
License: BSD-2-Clause
License File: org.postgresql.postgresql.license

org.projectlombok.lombok - Lombok is a Java library that provides annotations to simplify Java development by automating the generation of boilerplate code. (https://projectlombok.org/LICENSE)
License: BSD-2-Clause
License File: org.projectlombok.lombok.license

org.projectlombok.lombok-mapstruct-binding - Binding for Lombok and Mapstruct, to allow them to cooperate. (https://projectlombok.org/LICENSE)
License: BSD-2-Clause
License File: org.projectlombok.lombok-mapstruct-binding.license

org.liquibase.liquibase-core - Liquibase is a tool for managing and executing database changes. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.liquibase.liquibase-core.license

org.springframework.boot.spring-boot-starter-test - Starter for testing Spring Boot applications with libraries including JUnit Jupiter, Hamcrest and Mockito. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.boot.spring-boot-starter-test.license

org.springframework.security.spring-security-test - Spring Security Test. (https://www.apache.org/licenses/LICENSE-2.0.txt)
License: Apache License 2.0
License File: org.springframework.security.spring-security-test.license

org.testcontainers.junit-jupiter - Isolated container management for Java code testing. (http://opensource.org/licenses/MIT)
License: MIT
License File: org.testcontainers.junit-jupiter.license

org.testcontainers.postgresql - Isolated container management for Java code testing. (http://opensource.org/licenses/MIT)
License: MIT
License File: org.testcontainers.postgresql.license
29 changes: 29 additions & 0 deletions backend/HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Read Me First
The following was discovered as part of building this project:

* The original package name 'com.onlyoffice.docspace-pipedrive' is invalid and this project uses 'com.onlyoffice.docspacepipedrive' instead.

# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.2.5/maven-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.2.5/maven-plugin/reference/html/#build-image)
* [OAuth2 Client](https://docs.spring.io/spring-boot/docs/3.2.5/reference/htmlsingle/index.html#web.security.oauth2.client)
* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/3.2.5/reference/htmlsingle/index.html#data.sql.jpa-and-spring-data)
* [Spring Security](https://docs.spring.io/spring-boot/docs/3.2.5/reference/htmlsingle/index.html#web.security)
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.2.5/reference/htmlsingle/index.html#web)

### Guides
The following guides illustrate how to use some features concretely:

* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
* [Securing a Web Application](https://spring.io/guides/gs/securing-web/)
* [Spring Boot and OAuth2](https://spring.io/guides/tutorials/spring-boot-oauth2/)
* [Authenticating a User with LDAP](https://spring.io/guides/gs/authenticating-ldap/)
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)

24 changes: 24 additions & 0 deletions backend/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.0//EN"
"https://checkstyle.org/dtds/suppressions_1_0.dtd">

<suppressions>
<suppress files=".*java" checks="JavadocPackage"/>
<suppress files=".*java" checks="JavadocVariable"/>
<suppress files=".*java" checks="MissingJavadocMethod"/>
<suppress files=".*java" checks="DesignForExtension"/>

<suppress files="Configuration.java" checks="LineLength"/>
<suppress files="Configuration.java" checks="MagicNumber"/>
<suppress files="Controller.java" checks="FinalParameters"/>
<suppress files="DocspacePipedriveApplication.java" checks="HideUtilityClassConstructor"/>

<suppress files="src[\\/]main[\\/]java[\\/]com[\\/]onlyoffice[\\/]docspacepipedrive[\\/]entity[\\/].*" checks="MagicNumber"/>
<suppress files="src[\\/]main[\\/]java[\\/]com[\\/]onlyoffice[\\/]docspacepipedrive[\\/]client[\\/]pipedrive[\\/].*" checks="HiddenField"/>

<!-- TESTS -->
<suppress files="src[\\/]test[\\/]java[\\/]com[\\/]onlyoffice[\\/].*" checks="MethodName"/>
<suppress files="src[\\/]test[\\/]java[\\/]com[\\/]onlyoffice[\\/].*" checks="MagicNumber"/>
<suppress files="src[\\/]test[\\/]java[\\/]com[\\/]onlyoffice[\\/].*" checks="VisibilityModifier"/>
</suppressions>
Loading

0 comments on commit 42a9411

Please sign in to comment.