api/src/data/permissions/actions/permission.ts

Summary

Maintainability
F
2 wks
Test Coverage

File permission.ts has 1459 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export const moduleObjects = {
  brands: {
    name: 'brands',
    description: 'Brands',
    actions: [
Severity: Major
Found in api/src/data/permissions/actions/permission.ts - About 3 days to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      deals: {
        name: 'deals',
        description: 'Deals',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 1 other location - About 1 day to fix
    api/src/data/permissions/actions/permission.ts on lines 577..699

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 327.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      tasks: {
        name: 'tasks',
        description: 'Tasks',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 1 other location - About 1 day to fix
    api/src/data/permissions/actions/permission.ts on lines 189..311

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 327.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      dashboards: {
        name: 'dashboards',
        description: 'Dashboards',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 3 other locations - About 4 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 48..94
    api/src/data/permissions/actions/permission.ts on lines 95..141
    api/src/data/permissions/actions/permission.ts on lines 700..746

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 131.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      customers: {
        name: 'customers',
        description: 'Customers',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 3 other locations - About 4 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 48..94
    api/src/data/permissions/actions/permission.ts on lines 142..188
    api/src/data/permissions/actions/permission.ts on lines 700..746

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 131.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      companies: {
        name: 'companies',
        description: 'Companies',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 3 other locations - About 4 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 95..141
    api/src/data/permissions/actions/permission.ts on lines 142..188
    api/src/data/permissions/actions/permission.ts on lines 700..746

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 131.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      engages: {
        name: 'engages',
        description: 'Campaigns',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 3 other locations - About 4 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 48..94
    api/src/data/permissions/actions/permission.ts on lines 95..141
    api/src/data/permissions/actions/permission.ts on lines 142..188

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 131.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      inbox: {
        name: 'inbox',
        description: 'Inbox',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 3 other locations - About 3 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 766..802
    api/src/data/permissions/actions/permission.ts on lines 865..901
    api/src/data/permissions/actions/permission.ts on lines 1210..1246

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 105.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      users: {
        name: 'users',
        description: 'Team members',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 3 other locations - About 3 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 766..802
    api/src/data/permissions/actions/permission.ts on lines 1092..1128
    api/src/data/permissions/actions/permission.ts on lines 1210..1246

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 105.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      skills: {
        name: 'skills',
        description: 'Skills',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 3 other locations - About 3 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 766..802
    api/src/data/permissions/actions/permission.ts on lines 865..901
    api/src/data/permissions/actions/permission.ts on lines 1092..1128

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 105.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

      permissions: {
        name: 'permissions',
        description: 'Permissions config',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 3 other locations - About 3 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 865..901
    api/src/data/permissions/actions/permission.ts on lines 1092..1128
    api/src/data/permissions/actions/permission.ts on lines 1210..1246

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 105.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      structures: {
        name: 'structures',
        description: 'Structure',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 4 other locations - About 2 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 1247..1278
    api/src/data/permissions/actions/permission.ts on lines 1373..1404
    api/src/data/permissions/actions/permission.ts on lines 1405..1431
    api/src/data/permissions/actions/permission.ts on lines 1432..1458

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 92.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      branches: {
        name: 'branches',
        description: 'Branch',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 4 other locations - About 2 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 1247..1278
    api/src/data/permissions/actions/permission.ts on lines 1341..1372
    api/src/data/permissions/actions/permission.ts on lines 1373..1404
    api/src/data/permissions/actions/permission.ts on lines 1405..1431

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 92.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      departments: {
        name: 'departments',
        description: 'Department',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 4 other locations - About 2 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 1247..1278
    api/src/data/permissions/actions/permission.ts on lines 1341..1372
    api/src/data/permissions/actions/permission.ts on lines 1405..1431
    api/src/data/permissions/actions/permission.ts on lines 1432..1458

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 92.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      units: {
        name: 'units',
        description: 'Unit',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 4 other locations - About 2 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 1247..1278
    api/src/data/permissions/actions/permission.ts on lines 1341..1372
    api/src/data/permissions/actions/permission.ts on lines 1373..1404
    api/src/data/permissions/actions/permission.ts on lines 1432..1458

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 92.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      automations: {
        name: 'automations',
        description: 'Automations',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 4 other locations - About 2 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 1341..1372
    api/src/data/permissions/actions/permission.ts on lines 1373..1404
    api/src/data/permissions/actions/permission.ts on lines 1405..1431
    api/src/data/permissions/actions/permission.ts on lines 1432..1458

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 92.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      channels: {
        name: 'channels',
        description: 'Channels',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 2 other locations - About 2 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 2..24
    api/src/data/permissions/actions/permission.ts on lines 940..962

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 79.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      importHistories: {
        name: 'importHistories',
        description: 'Import histories',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 2 other locations - About 2 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 2..24
    api/src/data/permissions/actions/permission.ts on lines 25..47

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 79.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      brands: {
        name: 'brands',
        description: 'Brands',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 2 other locations - About 2 hrs to fix
    api/src/data/permissions/actions/permission.ts on lines 25..47
    api/src/data/permissions/actions/permission.ts on lines 940..962

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 79.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      knowledgeBase: {
        name: 'knowledgeBase',
        description: 'KnowledgeBase',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1129..1147
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      scripts: {
        name: 'scripts',
        description: 'Scripts',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1129..1147
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      usersGroups: {
        name: 'usersGroups',
        description: 'Users Groups',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1129..1147
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      webhooks: {
        name: 'webhooks',
        description: 'Webhooks',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1129..1147

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      generalSettings: {
        name: 'generalSettings',
        description: 'General settings',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      responseTemplates: {
        name: 'responseTemplates',
        description: 'Response templates',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1129..1147
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      emailTemplates: {
        name: 'emailTemplates',
        description: 'Email template',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1129..1147
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      segments: {
        name: 'segments',
        description: 'Segments',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1129..1147
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      tags: {
        name: 'tags',
        description: 'Tags',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 982..1000
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1129..1147
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

      forms: {
        name: 'forms',
        description: 'Form',
        actions: [
          {
    Severity: Major
    Found in api/src/data/permissions/actions/permission.ts and 9 other locations - About 1 hr to fix
    api/src/data/permissions/actions/permission.ts on lines 747..765
    api/src/data/permissions/actions/permission.ts on lines 803..821
    api/src/data/permissions/actions/permission.ts on lines 822..840
    api/src/data/permissions/actions/permission.ts on lines 902..920
    api/src/data/permissions/actions/permission.ts on lines 921..939
    api/src/data/permissions/actions/permission.ts on lines 963..981
    api/src/data/permissions/actions/permission.ts on lines 1001..1019
    api/src/data/permissions/actions/permission.ts on lines 1129..1147
    api/src/data/permissions/actions/permission.ts on lines 1158..1176

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 66.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status