linagora/openpaas-esn

View on GitHub

Showing 726 of 2,177 total issues

Function WebServerWrapper has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function WebServerWrapper(server) {
  var webserver = server;

  function asArray(values) {
    return util.isArray(values) ? values : [values];
Severity: Minor
Found in backend/webserver/webserver-wrapper.js - About 1 hr to fix

    Function esnUserNotificationListItem has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function esnUserNotificationListItem(_, $compile, esnUserNotificationTemplateProviderRegistry) {
        function link(scope, element) {
          var provider = esnUserNotificationTemplateProviderRegistry.get(scope.notification.category);
          var notificationTemplate = provider && provider.template || 'esn-user-notification-external';
          var forceClosePopoverOnClick = provider && provider.forceClosePopoverOnClick || false;

      Function listByCursor has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function listByCursor(options = {}) {
        const query = _.isEmpty(options) ? {} : { $and: [] };
      
        if (options.domainIds && options.domainIds.length) {
          query.$and.push({
      Severity: Minor
      Found in backend/core/user/index.js - About 1 hr to fix

        Function getAvatarFromEmail has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports.getAvatarFromEmail = function(email, callback) {
          var objectForEmail, type;
          var types = Object.keys(avatarProviders);
          async.whilst(
            function() {
        Severity: Minor
        Found in backend/core/avatar/index.js - About 1 hr to fix

          Function ESNOAuthApplicationListController has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function ESNOAuthApplicationListController($log, $modal, $scope, ESNOauthApplicationClient) {
              var self = this;
          
              self.$onInit = $onInit;
              self.openModal = openModal;

            Function remove has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  remove: function(predicate) {
                    var defer = $q.defer();
                    var resolved = false;
                    var numProviderPromiseNotResolved = this.providersPromises.length;
                    var self = this;
            Severity: Minor
            Found in frontend/js/modules/provider.js - About 1 hr to fix

              Function compile has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  directive.compile = function() {
                    var link = previousCompile.apply(this, arguments);
                    return function(scope, element, attrs, controller) {
                      var ngModel;
                      if (detectUtils.isMobile()) {
              Severity: Minor
              Found in frontend/js/modules/datepicker-utils.js - About 1 hr to fix

                Function _generateJWT has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function _generateJWT() {
                  return new Promise((resolve, reject) => {
                    crypto.generateKeyPair(
                      'rsa',
                      {
                Severity: Minor
                Found in bin/commands/generateJWT.js - About 1 hr to fix

                  Function userStatusSyncService has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function userStatusSyncService($q, $rootScope, _, userStatusClientService, userStatusService, USER_STATUS_EVENTS) {
                  
                        return {
                          synchronize: synchronize
                        };

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

                    module.exports = function(dependencies, lib) {
                    
                      const cron = dependencies('cron');
                      const logger = dependencies('logger');
                      const websocket = require('./websocket')(dependencies, lib);
                    Severity: Minor
                    Found in modules/linagora.esn.user.status/backend/lib/cron.js - About 1 hr to fix

                      Function http has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function http(req, res, options) {
                          var endpointUrl = url.parse(options.endpoint);
                      
                          var proxyPath = endpointUrl.pathname;
                          if (proxyPath[proxyPath.length - 1] !== '/') {
                      Severity: Minor
                      Found in modules/linagora.esn.davproxy/backend/webserver/proxy/proxy.js - About 1 hr to fix

                        Function getGroupAddressbookHomes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function getGroupAddressbookHomes(user, options) {
                            const { davServerUrl, ESNToken } = options;
                            const { getDavEndpoint, checkResponse } = require('./utils')(dependencies, { davServerUrl });
                        
                            return getDavEndpoint(user)

                          Function finalize has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            exports.finalize = function(invitation, data, done) {
                          
                              if (!invitation) {
                                return done(new Error('Invalid invitation request'));
                              }

                            Function loadUserDataForCollaboration has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                loadUserDataForCollaboration: function(user, collaboration) {
                            
                                  if (!user || !collaboration) {
                                    return q.reject(new Error('User and collaboration are required'));
                                  }
                            Severity: Minor
                            Found in modules/linagora.esn.digest.daily/lib/daily.js - About 1 hr to fix

                              Function stopListen has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function stopListen() {
                                    if (!listening) { return; }
                              
                                    if (sio) {
                                      sio.removeListener(CONTACT_WS.events.CREATED, onCreate);

                                Function contactListToggle has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  function contactListToggle(
                                    $rootScope,
                                    ContactListToggleDisplayService,
                                    ContactListToggleEventService,
                                    CONTACT_LIST_DISPLAY

                                  Function ContactVirtualFollowingsLoaderService has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function ContactVirtualFollowingsLoaderService(followAPI, session, CONTACT_LIST_PAGE_SIZE) {
                                      return {
                                        getFollowingsCount: getFollowingsCount,
                                        list: list
                                      };

                                    Function addressbookHome has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          ContactAPIClient.addressbookHome = function(bookId) {
                                            return {
                                              addressbook: function(bookName) {
                                    
                                                return {

                                      Function ContactVirtualAddressBookPaginationProvider has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function ContactVirtualAddressBookPaginationProvider($log) {
                                      
                                          function ContactVirtualAddressBookPaginationProvider(options) {
                                            this.options = options;
                                      
                                      

                                        Function addMembershipRequest has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function addMembershipRequest(req, res) {
                                          const collaboration = req.collaboration;
                                          const userAuthor = req.user;
                                          const userTargetId = req.params.user_id;
                                          const objectType = req.params.objectType;
                                        Severity: Minor
                                        Found in backend/webserver/controllers/collaborations.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language