| @@ -78,16 +78,16 @@ | ||
| 78 | 78 | |
| 79 | 79 | $view = FrmAppHelper::get_param( 'view', '', 'get', 'sanitize_text_field' ); |
| 80 | 80 | $data = array(); |
| 81 | 81 | |
| 82 | - if ( 'applications' !== $view ) { | |
| 82 | + if ( 'applications' === $view ) { | |
| 83 | + FrmAppHelper::permission_check( 'frm_edit_applications' ); | |
| 84 | + } else { | |
| 83 | 85 | FrmAppHelper::permission_check( self::get_required_capability() ); |
| 84 | 86 | |
| 85 | - // view may be 'applications', 'templates', or empty. | |
| 87 | + // View may be 'applications', 'templates', or empty. | |
| 86 | 88 | $data['templates'] = self::get_prepared_template_data(); |
| 87 | 89 | $data['categories'] = FrmApplicationTemplate::get_categories(); |
| 88 | - } else { | |
| 89 | - FrmAppHelper::permission_check( 'frm_edit_applications' ); | |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * @param array $data |