linagora/openpaas-esn

View on GitHub

Showing 726 of 2,177 total issues

Function exports has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = dependencies => {
  const importerRegistry = require('../registry')(dependencies);
  const {
    cleanOutdatedContacts,
    getImporterOptions,

    Function update has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function update(req, res) {
      const domain = {
        id: req.params.uuid,
        company_name: req.body.company_name || req.domain.company_name,
        hostnames: [...new Set(req.body.hostnames || req.domain.hostnames)]
    Severity: Minor
    Found in backend/webserver/controllers/domains.js - About 1 hr to fix

      Function create has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function create(fn, delay, context, onComplete, onCancel) {
          logger.debug('Creating a task delayed by %s', delay);
      
          delay = delay || DEFAULT_DELAY;
          var options = context || {};
      Severity: Minor
      Found in modules/linagora.esn.graceperiod/lib/index.js - About 1 hr to fix

        Function commentMessage has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function commentMessage(message, inReplyTo, req, res) {
        
          var publishCommentActivity = function(parentMessage, childMessage) {
            publishCommentActivityHelper(req.user, inReplyTo, parentMessage, childMessage);
          };
        Severity: Minor
        Found in backend/webserver/controllers/messages.js - About 1 hr to fix

          Function getMailer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function getMailer(user) {
            const mailSenderPromise = getMailSender(user);
          
            return {
              send: send.bind(null, 'send'),
          Severity: Minor
          Found in backend/core/email/index.js - About 1 hr to fix

            Function removeMembers has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function removeMembers(collaboration, members, callback) {
                if (!collaboration || !Array.isArray(members)) {
                  return callback(new Error('Collaboration and members are required'));
                }
            
            
            Severity: Minor
            Found in backend/core/collaboration/member/index.js - About 1 hr to fix

              Function buildWithEmailTemplates has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function buildWithEmailTemplates(message, template, locals = {}) {
                  const templatesDir = getTemplatesDir(template, options.defaultTemplatesDir);
                  const templateName = template.name || template;
                  const deferred = Q.defer();
              
              
              Severity: Minor
              Found in backend/core/email/message-builder.js - About 1 hr to fix

                Function _createInterface has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  _createInterface(topic) {
                    return {
                      subscribe: handler => {
                        if (!this.client) {
                          return this._addCache(topic, 'subscribe', handler);
                Severity: Minor
                Found in backend/core/pubsub/pubsub.js - About 1 hr to fix

                  Function esnAttachmentsSelectorController has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function esnAttachmentsSelectorController(esnAttachmentsSelectorService) {
                      var self = this;
                  
                      if (self.attachmentHolder === undefined) {
                        self.attachmentHolder = esnAttachmentsSelectorService.newAttachmentServiceHolder({

                    Function esnMessageService has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function esnMessageService(esnMessageRegistry, esnMessageHelpers) {
                        return {
                          canRemove: canRemove,
                          canShare: canShare,
                          canUpdate: canUpdate
                    Severity: Minor
                    Found in frontend/js/modules/message/message.service.js - About 1 hr to fix

                      Function contactSearchProviders has 9 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          _,
                          $q,
                          Providers,
                          esnSearchProvider,
                          contactSearchResultsProviderSubmit,

                        Function runBlock has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            ContactVirtualAddressBookRegistry,
                            ContactFollowingVirtualAddressBook,
                            DisplayShellProvider,
                            ContactUserDisplayShell,
                            ContactUserShellHelper,

                          Function infiniteList has 9 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              function infiniteList($interval, $q, MutationObserver, infiniteListService, INFINITE_LIST_EVENTS, INFINITE_LIST_IMMEDIATE_CHECK,
                                                    INFINITE_LIST_DISTANCE, INFINITE_LIST_DISABLED, INFINITE_LIST_POLLING_INTERVAL) {
                          Severity: Major
                          Found in frontend/js/modules/infinite-list/infinite-list.directive.js - About 1 hr to fix

                            Function esnTimelineEntriesController has 9 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              function esnTimelineEntriesController($scope, $log, _, esnTimelineEntriesHelper, infiniteScrollHelperBuilder, PageAggregatorService, TimelinePaginationProvider, session, TIMELINE_PAGE_SIZE) {
                            Severity: Major
                            Found in frontend/js/modules/timeline/timeline-entries.controller.js - About 1 hr to fix

                              Function $get has 9 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  this.$get = function($window, $rootScope, $timeout, $q, boxOverlayManager, BoxOverlayStateManager, deviceDetector, DEVICES, ESN_BOX_OVERLAY_EVENTS) {
                              Severity: Major
                              Found in frontend/js/modules/box-overlay/box-overlay.provider.js - About 1 hr to fix

                                Function esnCollaborationInviteUsers has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    $q,
                                    $rootScope,
                                    notificationFactory,
                                    session,
                                    esnCollaborationService,

                                  Function getReplyTo has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function getReplyTo(to, user, callback) {
                                      if (!to) {
                                        return callback(new Error('target is required'));
                                      }
                                  
                                  
                                  Severity: Minor
                                  Found in modules/linagora.esn.messaging.email/lib/index.js - About 1 hr to fix

                                    Function getAddressbooks has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      function getAddressbooks(req, res) {
                                        var options = {
                                          ESNToken: req.token && req.token.token ? req.token.token : '',
                                          davserver: req.davserver
                                        };

                                      Function controller has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            controller: function($scope, $location, invitationAPI, notificationFactory) {
                                              $scope.settings = { firstname: '', lastname: '', email: '' };
                                              $scope.signupButton = {
                                                label: 'Sign up in OpenPaas',
                                                notRunning: 'Sign up in OpenPaas',

                                        Function contactCopyController has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          function contactCopyController(
                                            _,
                                            asyncAction,
                                            contactAddressbookDisplayService,
                                            contactAddressbookService,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language