mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[PRODSEC-6575] Shared link not accessible now after the expiry date which was earlier accessible even after that expiration date (#8540)
* Shared link expiry date code implementation * test case updated * removed unsed code * design changes as per the new design of Share dialog * test cases modification as per new design changes * placeholder modified for expiration date * look and feel changes for share dialog as per Shane comments * boolean name changed as per naming convention * review comments addressed * review comments addressed * type specified for node object * linting corrections * resolved nested ternary date operation into an independent statement * review comments addressed * used date-fns instead of moment.js in code as well as in test cases * review comments for date-fns addressed * removed extra line * removed extra empty lines in template * import changes and indentation correction * error in console resolved which was occuring after selecting date and time * used mat-datepicker instead of mat-datetimepicker * package-lock.json file updated for date-fns implementation * made type 'date' as default and removed the settings coming from the ACA * unit test case modifications as per calender changes * e2e modifications as per new calendar component
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NodePaging, SharedLinkEntry, SharedlinksApi } from '@alfresco/js-api';
|
||||
import { NodePaging, SharedLinkBodyCreate, SharedLinkEntry, SharedlinksApi } from '@alfresco/js-api';
|
||||
import { Observable, from, of, Subject } from 'rxjs';
|
||||
import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
@@ -62,11 +62,12 @@ export class SharedLinksApiService {
|
||||
* Creates a shared link available to the current user.
|
||||
*
|
||||
* @param nodeId ID of the node to link to
|
||||
* @param sharedLinkWithExpirySettings shared link with nodeId and expiryDate
|
||||
* @param options Options supported by JS-API
|
||||
* @returns The shared link just created
|
||||
*/
|
||||
createSharedLinks(nodeId: string, options: any = {}): Observable<SharedLinkEntry> {
|
||||
const promise = this.sharedLinksApi.createSharedLink({ nodeId }, options);
|
||||
createSharedLinks(nodeId: string, sharedLinkWithExpirySettings?: SharedLinkBodyCreate, options: any = {}): Observable<SharedLinkEntry> {
|
||||
const promise = this.sharedLinksApi.createSharedLink(sharedLinkWithExpirySettings? sharedLinkWithExpirySettings : { nodeId }, options);
|
||||
|
||||
return from(promise).pipe(
|
||||
catchError((err) => of(err))
|
||||
|
Reference in New Issue
Block a user